<!DOCTYPE html PUBLIC "-//W3C//XHTML 1.0 Transitional" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title>POL Scripting Reference UO.EM</title>
		<meta name="keyword" content="POL, EScript, documentation, Ultima Online, UO, packets, client, ultima online client, emulator" />
		<meta name="description" content="Penultima Online Documentation website." />
		<meta name="Author" content="Racalac, Rykard" />
		<meta name="Generator" content="POL Doc-o-matic" />
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<link href="style.css" rel="stylesheet" type="text/css"  media="all"  />
	</head>
	<script language="JavaScript1.2" type="text/javascript">
function ExpandContract(s) {
  var bulletE = document.getElementById("bullet_"+s);
  var spanE = document.getElementById("span_"+s);
  var Expanded = bulletE.innerHTML;

  if(Expanded == '[+]') {
    spanE.style.display = 'block';
    bulletE.innerHTML = '[-]';
  }
  else { 
    spanE.style.display = 'none'; 
    bulletE.innerHTML = '[+]';
  }
}
</script>

<body>
<div class="container"><div id="doc-mini-header">
<div class="doc-home"><a href="index.html">
              Home
  				  </a></div>
<h1>
<a name="TOP"></a>
						File:
						UO.em</h1>
<p>
						Description:
						Functions that interact with and alter UO game world data, including server-client messages.<br><b>
							Last Modified:
							02/26/2009</b></p>
</div></div><div class="container"><div class="doc-mainbox">
<div class="expander"><a href="javascript:ExpandContract('Constants')" id="bullet_Constants">[-]</a></div>
<center><h2>File Constants:</h2></center>
<span id="span_Constants"><pre>// CreateMulti flags<br>// only for house creation:<br>const CRMULTI_IGNORE_MULTIS     := 0x0001;  // ignore intersecting multis<br>const CRMULTI_IGNORE_OBJECTS    := 0x0002;  // ignore dynamic objects<br>const CRMULTI_IGNORE_WORLDZ     := 0x0004;  // ignore standability, relative Z, world height<br>const CRMULTI_IGNORE_ALL        := 0x0007;<br>// only for boat creation:<br>const CRMULTI_FACING_NORTH      := 0x0000;<br>const CRMULTI_FACING_EAST       := 0x0100;<br>const CRMULTI_FACING_SOUTH      := 0x0200;<br>const CRMULTI_FACING_WEST       := 0x0300;<br> <br>//  ListHostiles exclusions<br>const LH_FLAG_LOS               := 1;       // only include those in LOS<br>const LH_FLAG_INCLUDE_HIDDEN    := 2;       // include hidden characters<br> <br>// FindPath flags<br>const FP_IGNORE_MOBILES         := 0x01;    // ignore Mobiles<br>const FP_IGNORE_DOORS           := 0x02;    // ignore Doors (you've to open doors by yourself)<br> <br>// Send*Window flags<br>const VENDOR_SEND_AOS_TOOLTIP   := 0x01;    // send Item Description using AoS Tooltips<br> <br>// RegisterForSpeechEvents flags<br>const LISTENPT_HEAR_GHOSTS      := 0x01;    // hear ghost speech in addition to living speech<br> <br>// List[Statics/Items]* flags<br>const ITEMS_IGNORE_STATICS      := 0x01;    // Don't list Static Items<br>const ITEMS_IGNORE_MULTIS       := 0x02;    // Don't list Multi Items<br> <br>// special value for List[Items/Mobiles/Statics]*<br>const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything<br> <br>//  ListMobilesNearLocationEx exclusions<br>const LISTEX_FLAG_NORMAL := 0x01;<br>const LISTEX_FLAG_HIDDEN := 0x02;<br>const LISTEX_FLAG_GHOST := 0x04;<br>const LISTEX_FLAG_CONCEALED := 0x08;<br> <br>// ListItemsNearLocationWithFlag( x,y,z, range, flags ); tiledata flags<br>// Thanks to Alazane: http://dkbush.cablenet-va.com/alazane/file_formats.html#3.17<br>const TILEDATA_FLAG_BACKGROUND  := 0x00000001; //Background<br>const TILEDATA_FLAG_WEAPON      := 0x00000002; //Weapon<br>const TILEDATA_FLAG_TRANSPARENT := 0x00000004; //Transparent<br>const TILEDATA_FLAG_TRANSLUCENT := 0x00000008; //Translucent<br>const TILEDATA_FLAG_WALL        := 0x00000010; //Wall<br>const TILEDATA_FLAG_DAMAGING    := 0x00000020; //Damaging<br>const TILEDATA_FLAG_IMPASSABLE  := 0x00000040; //Impassable<br>const TILEDATA_FLAG_WET         := 0x00000080; //Wet<br>const TILEDATA_FLAG_UNK         := 0x00000100; //Unknown<br>const TILEDATA_FLAG_SURFACE     := 0x00000200; //Surface<br>const TILEDATA_FLAG_BRIDGE      := 0x00000400; //Bridge<br>const TILEDATA_FLAG_STACKABLE   := 0x00000800; //Generic/Stackable<br>const TILEDATA_FLAG_WINDOW      := 0x00001000; //Window<br>const TILEDATA_FLAG_NOSHOOT     := 0x00002000; //No Shoot<br>const TILEDATA_FLAG_PREFIX_A    := 0x00004000; //Prefix A<br>const TILEDATA_FLAG_PREFIX_AN   := 0x00008000; //Prefix An<br>const TILEDATA_FLAG_INTERNAL    := 0x00010000; //Internal (things like hair, beards, etc)<br>const TILEDATA_FLAG_FOLIAGE     := 0x00020000; //Foliage<br>const TILEDATA_FLAG_PARTIAL_HUE := 0x00040000; //Partial Hue<br>const TILEDATA_FLAG_UNK1        := 0x00080000; //Unknown 1<br>const TILEDATA_FLAG_MAP         := 0x00100000; //Map<br>const TILEDATA_FLAG_CONTAINER   := 0x00200000; //Container<br>const TILEDATA_FLAG_WEARABLE    := 0x00400000; //Wearable<br>const TILEDATA_FLAG_LIGHTSOURCE := 0x00800000; //LightSource<br>const TILEDATA_FLAG_ANIMATED    := 0x01000000; //Animated<br>const TILEDATA_FLAG_NODIAGONAL  := 0x02000000; //No Diagonal<br>const TILEDATA_FLAG_UNK2        := 0x04000000; //Unknown 2<br>const TILEDATA_FLAG_ARMOR       := 0x08000000; //Armor<br>const TILEDATA_FLAG_ROOF        := 0x10000000; //Roof<br>const TILEDATA_FLAG_DOOR        := 0x20000000; //Door<br>const TILEDATA_FLAG_STAIRBACK   := 0x40000000; //StairBack<br>const TILEDATA_FLAG_STAIRRIGHT  := 0x80000000; //StairRight<br> <br>// GetStandingLayers( x, y, flags, realm := _DEFAULT_REALM ); mapdata flags<br>const MAPDATA_FLAG_NONE         := 0x0000;     // Nothing<br>const MAPDATA_FLAG_MOVELAND     := 0x0001;     // Move Land<br>const MAPDATA_FLAG_MOVESEA      := 0x0002;     // Move Sea<br>const MAPDATA_FLAG_BLOCKSIGHT   := 0x0004;     // Block Sight<br>const MAPDATA_FLAG_OVERFLIGHT   := 0x0008;     // Over Flight<br>const MAPDATA_FLAG_ALLOWDROPON  := 0x0010;     // Allow DropOn<br>const MAPDATA_FLAG_GRADUAL      := 0x0020;     // Gradual<br>const MAPDATA_FLAG_BLOCKING     := 0x0040;     // Blocking<br>const MAPDATA_FLAG_MORE_SOLIDS  := 0x0080;     // List more Solids<br> <br>const MAPDATA_FLAG_WALKBLOCK    := 0x0057;     // Move Land, Move Sea, Blocking, Block Sight, Allow DropOn<br>const MAPDATA_FLAG_MOVE_FLAGS   := 0x0063;     // Move Land, Move Sea, Blocking, Gradual<br>const MAPDATA_FLAG_DROP_FLAGS   := 0x0050;     // Blocking, Allow DropOn<br>const MAPDATA_FLAG_ALL          := 0xffffffff; // All<br> <br>// Constants for MoveObjectToLocation<br>const MOVEOBJECT_NORMAL    := 0x0;        // Implicit.  Will move if able.<br>const MOVEITEM_IGNOREMOVABLE   := 0x20000000; // Will ignore the movable property on items.<br>const MOVEOBJECT_FORCELOCATION := 0x40000000; // Force Z location<br> <br>// Constants for PrintTextAbove*<br>const JOURNAL_PRINT_NAME    := 0x00;  // Implicit.  Print's the object's description / npc's name in the journal.<br>const JOURNAL_PRINT_YOU_SEE := 0x01;  // Will print "You see:" in the journal.<br> <br>// Resurrect options<br>const RESURRECT_FORCELOCATION := 0x01;<br> <br>// MoveType constants for CanInsert/OnInsert/CanRemove/OnRemove scripts<br> <br>const MOVETYPE_PLAYER     := 0; // Moved by the player<br>const MOVETYPE_COREMOVE   := 1; // Moved with MoveItem*() (or equiv)<br>const MOVETYPE_CORECREATE := 2; // Created with CreateItemIn*() (or equiv)<br> <br>// InsertType constants for CanInsert/OnInsert scripts<br>const INSERT_ADD_ITEM          := 1;<br>const INSERT_INCREASE_STACK    := 2;<br> <br>// DeleteBy constants for CanDelete script<br>const DELETE_BY_PLAYER := 0;<br>const DELETE_BY_SCRIPT := 1;<br> <br>// EnumerateItemsInContainer constants<br>const ENUMERATE_IGNORE_LOCKED := 0x1; // List content of locked container.<br>const ENUMERATE_ROOT_ONLY   := 0x2; // Do not list contents of sub-containers.<br> <br>// FindSubstance constants<br>const FINDSUBSTANCE_IGNORE_LOCKED := 0x1; // Find matches in locked containers<br>const FINDSUBSTANCE_ROOT_ONLY     := 0x2; // Do not find matches in sub-containers.<br>const FINDSUBSTANCE_FIND_ALL      := 0x4; // Find all matches ignoring given amount<br> <br>//  SendTextEntryGump options<br>const TE_CANCEL_DISABLE := 0;<br>const TE_CANCEL_ENABLE  := 1;<br> <br>const TE_STYLE_DISABLE  := 0;<br>const TE_STYLE_NORMAL   := 1;<br>const TE_STYLE_NUMERICAL:= 2;<br> <br>//  SystemFindObjectBySerial options:<br>const SYSFIND_SEARCH_OFFLINE_MOBILES := 1;<br> <br>//  Target Options - add these together and pass as second<br>//  param to Target()<br>const TGTOPT_CHECK_LOS   := 0x0001;<br>const TGTOPT_NOCHECK_LOS := 0x0000; // to be explicit<br>const TGTOPT_HARMFUL     := 0x0002;<br>const TGTOPT_NEUTRAL     := 0x0000; // to be explicit<br>const TGTOPT_HELPFUL     := 0x0004;<br> <br>// POLCLASS_* constants - use with obj.isa(POLCLASS_*)<br>const POLCLASS_UOBJECT      := 1;<br>const POLCLASS_ITEM         := 2;<br>const POLCLASS_MOBILE       := 3;<br>const POLCLASS_NPC          := 4;<br>const POLCLASS_LOCKABLE     := 5;<br>const POLCLASS_CONTAINER    := 6;<br>const POLCLASS_CORPSE       := 7;<br>const POLCLASS_DOOR         := 8;<br>const POLCLASS_SPELLBOOK    := 9;<br>const POLCLASS_MAP          := 10;<br>const POLCLASS_MULTI        := 11;<br>const POLCLASS_BOAT         := 12;<br>const POLCLASS_HOUSE        := 13;<br>const POLCLASS_EQUIPMENT    := 14;<br>const POLCLASS_ARMOR        := 15;<br>const POLCLASS_WEAPON       := 16;<br> <br>// mobile.race constants<br>const RACE_HUMAN := 0;<br>const RACE_ELF   := 1;<br> <br>// Don't use these outside this file, use FONT_* from client.inc<br>//  (and I don't know what for color)<br>const _DEFAULT_TEXT_FONT     := 3;<br>const _DEFAULT_TEXT_COLOR    := 1000;<br> <br>// Realms<br>const _DEFAULT_REALM  := "britannia";<br>const REALM_BRITANNIA := _DEFAULT_REALM;<br>const REALM_ILSHENAR  := "ilshenar";<br>const REALM_MALAS     := "malas";<br>const REALM_TOKUNO    := "tokuno";<br> <br>//PerformAction<br>const ACTION_DIR_FORWARD  := 0;<br>const ACTION_DIR_BACKWARD := 1;<br>const ACTION_NOREPEAT     := 0;<br>const ACTION_REPEAT       := 1;</pre></span>
</div></div><div id="main"><div class="container">
<div class="doc-col_2">
<div class="doc-smallbox">
<div class="expander"><a href="javascript:ExpandContract('Functions')" id="bullet_Functions">[-]</a></div>
<center><h2>Functions:</h2></center>
<span id="span_Functions"><ul>
<li><a href="#Accessible">Accessible</a></li>
<li><a href="#AddAmount">AddAmount</a></li>
<li><a href="#AddMenuItem">AddMenuItem</a></li>
<li><a href="#ApplyConstraint">ApplyConstraint</a></li>
<li><a href="#AssignRectToWeatherRegion">AssignRectToWeatherRegion</a></li>
<li><a href="#Attach">Attach</a></li>
<li><a href="#Broadcast">Broadcast</a></li>
<li><a href="#CancelTarget">CancelTarget</a></li>
<li><a href="#CheckLineOfSight">CheckLineOfSight</a></li>
<li><a href="#CheckLosAt">CheckLosAt</a></li>
<li><a href="#CheckLosBetween">CheckLosBetween</a></li>
<li><a href="#CloseGump">CloseGump</a></li>
<li><a href="#CloseTradeWindow">CloseTradeWindow</a></li>
<li><a href="#ConsumeReagents">ConsumeReagents</a></li>
<li><a href="#ConsumeSubstance">ConsumeSubstance</a></li>
<li><a href="#CoordinateDistance">CoordinateDistance</a></li>
<li><a href="#CreateAccount">CreateAccount</a></li>
<li><a href="#CreateItemAtLocation">CreateItemAtLocation</a></li>
<li><a href="#CreateItemCopyAtLocation">CreateItemCopyAtLocation</a></li>
<li><a href="#CreateItemInBackpack">CreateItemInBackpack</a></li>
<li><a href="#CreateItemInContainer">CreateItemInContainer</a></li>
<li><a href="#CreateItemInInventory">CreateItemInInventory</a></li>
<li><a href="#CreateMenu">CreateMenu</a></li>
<li><a href="#CreateMultiAtLocation">CreateMultiAtLocation</a></li>
<li><a href="#CreateNpcFromTemplate">CreateNpcFromTemplate</a></li>
<li><a href="#DestroyItem">DestroyItem</a></li>
<li><a href="#DestroyMulti">DestroyMulti</a></li>
<li><a href="#Detach">Detach</a></li>
<li><a href="#DisableEvents">DisableEvents</a></li>
<li><a href="#DisconnectClient">DisconnectClient</a></li>
<li><a href="#Distance">Distance</a></li>
<li><a href="#EnableEvents">EnableEvents</a></li>
<li><a href="#EnumerateItemsInContainer">EnumerateItemsInContainer</a></li>
<li><a href="#EnumerateOnlineCharacters">EnumerateOnlineCharacters</a></li>
<li><a href="#EquipFromTemplate">EquipFromTemplate</a></li>
<li><a href="#EquipItem">EquipItem</a></li>
<li><a href="#EraseGlobalProperty">EraseGlobalProperty</a></li>
<li><a href="#EraseObjProperty">EraseObjProperty</a></li>
<li><a href="#FindAccount">FindAccount</a></li>
<li><a href="#FindObjtypeInContainer">FindObjtypeInContainer</a></li>
<li><a href="#FindPath">FindPath</a></li>
<li><a href="#FindSubstance">FindSubstance</a></li>
<li><a href="#GetAmount">GetAmount</a></li>
<li><a href="#GetCommandHelp">GetCommandHelp</a></li>
<li><a href="#GetCoordsInLine">GetCoordsInLine</a></li>
<li><a href="#GetEquipmentByLayer">GetEquipmentByLayer</a></li>
<li><a href="#GetFacing">GetFacing</a></li>
<li><a href="#GetGlobalProperty">GetGlobalProperty</a></li>
<li><a href="#GetGlobalPropertyNames">GetGlobalPropertyNames</a></li>
<li><a href="#GetHarvestDifficulty">GetHarvestDifficulty</a></li>
<li><a href="#GetMapInfo">GetMapInfo</a></li>
<li><a href="#GetMenuObjTypes">GetMenuObjTypes</a></li>
<li><a href="#GetMultiDimensions">GetMultiDimensions</a></li>
<li><a href="#GetObjProperty">GetObjProperty</a></li>
<li><a href="#GetObjPropertyNames">GetObjPropertyNames</a></li>
<li><a href="#GetObjType">GetObjType</a></li>
<li><a href="#GetObjTypeByName">GetObjTypeByName</a></li>
<li><a href="#GetRegionName">GetRegionName</a></li>
<li><a href="#GetRegionNameAtLocation">GetRegionNameAtLocation</a></li>
<li><a href="#GetRegionString">GetRegionString</a></li>
<li><a href="#GetSpellDifficulty">GetSpellDifficulty</a></li>
<li><a href="#GetStandingHeight">GetStandingHeight</a></li>
<li><a href="#GetStandingLayers">GetStandingLayers</a></li>
<li><a href="#GetWorldHeight">GetWorldHeight</a></li>
<li><a href="#GrantPrivilege">GrantPrivilege</a></li>
<li><a href="#HarvestResource">HarvestResource</a></li>
<li><a href="#IsStackable">IsStackable</a></li>
<li><a href="#ListAccounts">ListAccounts</a></li>
<li><a href="#ListEquippedItems">ListEquippedItems</a></li>
<li><a href="#ListGhostsNearLocation">ListGhostsNearLocation</a></li>
<li><a href="#ListHostiles">ListHostiles</a></li>
<li><a href="#ListItemsAtLocation">ListItemsAtLocation</a></li>
<li><a href="#ListItemsNearLocation">ListItemsNearLocation</a></li>
<li><a href="#ListItemsNearLocationOfType">ListItemsNearLocationOfType</a></li>
<li><a href="#ListItemsNearLocationWithFlag">ListItemsNearLocationWithFlag</a></li>
<li><a href="#ListMobilesInLineOfSight">ListMobilesInLineOfSight</a></li>
<li><a href="#ListMobilesNearLocation">ListMobilesNearLocation</a></li>
<li><a href="#ListMobilesNearLocationEx">ListMobilesNearLocationEx</a></li>
<li><a href="#ListMultisInBox">ListMultisInBox</a></li>
<li><a href="#ListObjectsInBox">ListObjectsInBox</a></li>
<li><a href="#ListStaticsAtLocation">ListStaticsAtLocation</a></li>
<li><a href="#ListStaticsInBox">ListStaticsInBox</a></li>
<li><a href="#ListStaticsNearLocation">ListStaticsNearLocation</a></li>
<li><a href="#MoveItemToContainer">MoveItemToContainer</a></li>
<li><a href="#MoveItemToSecureTradeWin">MoveItemToSecureTradeWin</a></li>
<li><a href="#MoveObjectToLocation">MoveObjectToLocation</a></li>
<li><a href="#OpenPaperdoll">OpenPaperdoll</a></li>
<li><a href="#PerformAction">PerformAction</a></li>
<li><a href="#PlayLightningBoltEffect">PlayLightningBoltEffect</a></li>
<li><a href="#PlayMovingEffect">PlayMovingEffect</a></li>
<li><a href="#PlayMovingEffectEx">PlayMovingEffectEx</a></li>
<li><a href="#PlayMovingEffectXYZ">PlayMovingEffectXYZ</a></li>
<li><a href="#PlayMovingEffectXYZEx">PlayMovingEffectXYZEx</a></li>
<li><a href="#PlayMusic">PlayMusic</a></li>
<li><a href="#PlayObjectCenteredEffect">PlayObjectCenteredEffect</a></li>
<li><a href="#PlayObjectCenteredEffectEx">PlayObjectCenteredEffectEx</a></li>
<li><a href="#PlaySoundEffect">PlaySoundEffect</a></li>
<li><a href="#PlaySoundEffectXYZ">PlaySoundEffectXYZ</a></li>
<li><a href="#PlaySoundEffectPrivate">PlaySoundEffectPrivate</a></li>
<li><a href="#PlayStationaryEffect">PlayStationaryEffect</a></li>
<li><a href="#PlayStationaryEffectEx">PlayStationaryEffectEx</a></li>
<li><a href="#Polcore">Polcore</a></li>
<li><a href="#PrintTextAbove">PrintTextAbove</a></li>
<li><a href="#PrintTextAbovePrivate">PrintTextAbovePrivate</a></li>
<li><a href="#ReadGameClock">ReadGameClock</a></li>
<li><a href="#RegisterForSpeechEvents">RegisterForSpeechEvents</a></li>
<li><a href="#ReleaseItem">ReleaseItem</a></li>
<li><a href="#RequestInput">RequestInput</a></li>
<li><a href="#ReserveItem">ReserveItem</a></li>
<li><a href="#RestartScript">RestartScript</a></li>
<li><a href="#Resurrect">Resurrect</a></li>
<li><a href="#RevokePrivilege">RevokePrivilege</a></li>
<li><a href="#SaveWorldState">SaveWorldState</a></li>
<li><a href="#SecureTradeWin">SecureTradeWin</a></li>
<li><a href="#SelectColor">SelectColor</a></li>
<li><a href="#SelectMenuItem2">SelectMenuItem2</a></li>
<li><a href="#SendBuyWindow">SendBuyWindow</a></li>
<li><a href="#SendCharacterRaceChanger">SendCharacterRaceChanger</a></li>
<li><a href="#SendDialogGump">SendDialogGump</a></li>
<li><a href="#SendEvent">SendEvent</a></li>
<li><a href="#SendInstaResDialog">SendInstaResDialog</a></li>
<li><a href="#SendOpenBook">SendOpenBook</a></li>
<li><a href="#SendOpenSpecialContainer">SendOpenSpecialContainer</a></li>
<li><a href="#SendPacket">SendPacket</a></li>
<li><a href="#SendQuestArrow">SendQuestArrow</a></li>
<li><a href="#SendSellWindow">SendSellWindow</a></li>
<li><a href="#SendSkillWindow">SendSkillWindow</a></li>
<li><a href="#SendStatus">SendStatus</a></li>
<li><a href="#SendStringAsTipWindow">SendStringAsTipWindow</a></li>
<li><a href="#SendSysMessage">SendSysMessage</a></li>
<li><a href="#SendTextEntryGump">SendTextEntryGump</a></li>
<li><a href="#SendViewContainer">SendViewContainer</a></li>
<li><a href="#SetGlobalProperty">SetGlobalProperty</a></li>
<li><a href="#SetName">SetName</a></li>
<li><a href="#SetObjProperty">SetObjProperty</a></li>
<li><a href="#SetRegionLightLevel">SetRegionLightLevel</a></li>
<li><a href="#SetRegionWeatherLevel">SetRegionWeatherLevel</a></li>
<li><a href="#SetScriptController">SetScriptController</a></li>
<li><a href="#Shutdown">Shutdown</a></li>
<li><a href="#SpeakPowerWords">SpeakPowerWords</a></li>
<li><a href="#StartSpellEffect">StartSpellEffect</a></li>
<li><a href="#SubtractAmount">SubtractAmount</a></li>
<li><a href="#SystemFindObjectBySerial">SystemFindObjectBySerial</a></li>
<li><a href="#Target">Target</a></li>
<li><a href="#TargetCoordinates">TargetCoordinates</a></li>
<li><a href="#TargetMultiPlacement">TargetMultiPlacement</a></li>
<li><a href="#UpdateMobile">UpdateMobile</a></li>
<li><a href="#UseItem">UseItem</a></li>
</ul></span>
</div>
<div class="doc-smallbox-gold">
<div class="expander"><a href="javascript:ExpandContract('Modules')" id="bullet_Modules">[-]</a></div>
<center><h2>Modules:</h2></center>
<span id="span_Modules"><ul>
<li><a href="attributesem.html">
                      Attributes
          				  </a></li>
<li><a href="basicem.html">
                      Basic
          				  </a></li>
<li><a href="boatem.html">
                      Boat
          				  </a></li>
<li><a href="cfgfileem.html">
                      CfgFile
          				  </a></li>
<li><a href="clilocem.html">
                      CliLoc
          				  </a></li>
<li><a href="datafileem.html">
                      DataFile
          				  </a></li>
<li><a href="fileem.html">
                      File
          				  </a></li>
<li><a href="guildsem.html">
                      Guild
          				  </a></li>
<li><a href="httpem.html">
                      Http
          				  </a></li>
<li><a href="mathem.html">
                      Math
          				  </a></li>
<li><a href="npcem.html">
                      Npc
          				  </a></li>
<li><a href="osem.html">
                      OS
          				  </a></li>
<li><a href="partyem.html">
                      Party
          				  </a></li>
<li><a href="polsysem.html">
                      PolSys
          				  </a></li>
<li><a href="storageem.html">
                      Storage
          				  </a></li>
<li><a href="unicodeem.html">
                      Unicode
          				  </a></li>
<li><a href="uoem.html">
                      UO
          				  </a></li>
<li><a href="utilem.html">
                      Util
          				  </a></li>
<li><a href="vitalsem.html">
                      Vitals
          				  </a></li>
</ul></span>
</div>
</div>
<div class="doc-col_23">
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Accessible">Accessible( Character, item )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>Character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Function: Determines if an item falls into one of the following categories for a character:</td></tr>
<tr><td colspan="2">An item on the ground, within two squares </td></tr>
<tr><td colspan="2">An item equipped by the character </td></tr>
<tr><td colspan="2">An item inside the character's backpack </td></tr>
<tr><td colspan="2">A temporarily accessible item </td></tr>
<tr><td colspan="2">Notes: Does not check that character has line-of-sight to item. </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">0 if item does not fall into one of the above categories, 1 if the item does. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="AddAmount">AddAmount( item_ref, amount )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>item_ref</var></td>
<td>Item reference</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>An integer 1-60000</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Adds the specified amount to a stack of items. Amount is between 1 and 60000 </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 or error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"That item is being used" (if inuse or reserved)</td></tr>
<tr><td colspan="2">"That item type is not stackable" </td></tr>
<tr><td colspan="2">"Can't add that much to that stack" (if resulting amount &gt; 60000)</td></tr>
<tr><td colspan="2">"Invalid Parameter type"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="AddMenuItem">AddMenuItem( menu, objtype, text, color=:0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>menu</var></td>
<td>Dynamic Menu Reference (from CreateMenu())</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer tile graphic to add to menu</td>
</tr>
<tr>
<td width="50%"><var>text</var></td>
<td>String description</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Adds a menu item to a dynamic menu. </td></tr>
<tr><td colspan="2">Notes: The 'objtype' field of a mobile is not appropriate here.  There is special art for 
      mobiles for use in menus.  Human Males (object type: 0x190) use 0x2106, females 0x2107.  
      Use InsideUO to determine other values.
      Color defaults to 0 if no itemdesc.cfg entry exists.
      Hint: menus.cfg uses the color of the itemdesc entry of the objtype given.</td></tr>
<tr><td colspan="2">0 for objtype creates a checkbox-style menu</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the item was added successfully</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on invalid parameters)</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ApplyConstraint">ApplyConstraint( objlist, configfile, propertyname, minvalue )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>objlist</var></td>
<td>array of objtype numbers</td>
</tr>
<tr>
<td width="50%"><var>configfile</var></td>
<td>config file reference</td>
</tr>
<tr>
<td width="50%"><var>propertyname</var></td>
<td>string</td>
</tr>
<tr>
<td width="50%"><var>minvalue</var></td>
<td>integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Each element's objtype in "objlist" is looked up in the config file referenced by "configfile".
        if the object's value for "propertyname" is less than "minvalue", its objtype is included in the returned array.</td></tr>
<tr><td colspan="2">Notes: Example: gets all the bowcraft items you can make given the amount of logs selected.
</td></tr>
<tr><td colspan="2"><pre>
//Returns all the objtypes in the "BowcraftCarving" entry in menus.cfg:
var objtypes := GetMenuObjTypes( "BowcraftCarving" );
//Returns a subset of the objtypes in the bowcraft item crafting config file that require
//less "material" than the value of targetted_logs.amount.
objtypes := ApplyConstraint(objtypes,bowcraftconfigfile,"material",targetted_logs.amount);
//the return value is in a convienent form to use AddMenuItem()
return objtypes;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An Array of Object Types that pass the constraint.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (instead returns an Uninitialized Object on failure)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="AssignRectToWeatherRegion">AssignRectToWeatherRegion( region, xwest, ynorth, xeast, ysouth )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>region</var></td>
<td>string</td>
</tr>
<tr>
<td width="50%"><var>xwest</var></td>
<td>integer</td>
</tr>
<tr>
<td width="50%"><var>ynorth</var></td>
<td>integer</td>
</tr>
<tr>
<td width="50%"><var>xeast</var></td>
<td>integer</td>
</tr>
<tr>
<td width="50%"><var>ysouth</var></td>
<td>integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Sets the range for weather region named "region". Useful for making moving storms.
  Notes: Weather region strings as defined in regions/weather.cfg</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid Parameter type"</td></tr>
<tr><td colspan="2">"Weather region not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#weather.cfg"><b>weather.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Attach">Attach( character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Associates the current script to the character. See Detach() too.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Another script still attached."</td></tr>
<tr><td colspan="2">"Another character still attached."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Broadcast">Broadcast( text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>text</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional)</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td> Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends text as a System Message to every online player. </td></tr>
<tr><td colspan="2">See client.inc for font and color values.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on invalid parameter) </td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CancelTarget">CancelTarget( of_whom )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>of_whom</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">If the character has a current Target Reference, it sends the cancel packet. Client response to the original target cursor's script is as if they hit Escape.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">0</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client connected"</td></tr>
<tr><td colspan="2">"Client does not have an active target cursor"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CheckLineOfSight">CheckLineOfSight( object1, object2 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object1</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>object2</var></td>
<td>UObject Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Tests if object1 has Line-of-sight to object 2</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">0 if sight blocked</td></tr>
<tr><td colspan="2">1 if object1 has LOS to object2</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on invalid parameter)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CheckLosAt">CheckLosAt( character, x, y, z )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Tests if character has Line-of-sight to coordinate</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">1 if character has line-of-sight to (x,y,z)</td></tr>
<tr><td colspan="2">0 if character does not have line-of-sight to (x,y,z)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">(returns 0 on invalid parameter)</td></tr>
<tr><td colspan="2">"Invalid Coordinates for realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CheckLosBetween">CheckLosBetween( x1, y1, z1, x2, y2, z2, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x1,y1,z1</var></td>
<td>Integer world coordinates for coordinate 1</td>
</tr>
<tr>
<td width="50%"><var>x2,y2,z2</var></td>
<td>Integer world coordinates for coordinate 2</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Tests if coordinate 1 has Line-of-sight to coordinate 2</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">1 if coordinate 1 has line-of-sight to coordinate 2</td></tr>
<tr><td colspan="2">0 if coordinate 1 does not have line-of-sight to coordinate 2</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">(returns 0 on invalid parameter)</td></tr>
<tr><td colspan="2">"Invalid Coordinates for realm"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CloseGump">CloseGump( chr, pid, response := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>chr</var></td>
<td>Character</td>
</tr>
<tr>
<td width="50%"><var>pid</var></td>
<td>Integer - PID of the script that sent the gump</td>
</tr>
<tr>
<td width="50%"><var>response</var></td>
<td>UObject - what is going to be returned to the gump script</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Closes the gump, returning 'response' to the script that called SendDialogGump()</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid Parameters"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Couldnt find script"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Script"><b>Script</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CloseTradeWindow">CloseTradeWindow( character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Attempts to close the Trade Window a client has open.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Mobile is not currently trading with anyone."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ConsumeReagents">ConsumeReagents( caster, spellid )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>caster</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>spellid</var></td>
<td>An integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Removes reagent items from caster's pack according to spellid's definition in spells.cfg. Spells.cfg 
files define spells &amp; spell ids.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on successful consume, 0 if not enough of defined reagents</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Spell ID out of range" if !(spellid &gt;= 1 &amp;&amp; spellid &lt;= last spellid)</td></tr>
<tr><td colspan="2">"No such spell" if spellid not found</td></tr>
<tr><td colspan="2">"Invalid parameter"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#spells.cfg"><b>spells.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ConsumeSubstance">ConsumeSubstance( container, objtype, amount )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>container</var></td>
<td>Container reference</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer objtype to find and consume</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>An integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Subtracts "amount" from the first stack of type "objtype" found, starting in container 
"container"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"That is not a container" if container.isa(POLCLASS_CONTAINER) == false</td></tr>
<tr><td colspan="2">"Amount cannot be negative" if amount &lt; 0</td></tr>
<tr><td colspan="2">"Not enough of that substance in container"</td></tr>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CoordinateDistance">CoordinateDistance(x1, y1, x2, y2)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x1,y1</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>x2,y2</var></td>
<td>Integer world coordinates</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Calculates the distance between two coordinates.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">The distance between two coordinates.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateAccount">CreateAccount( acctname, password, enabled )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>acctname</var></td>
<td>string</td>
</tr>
<tr>
<td width="50%"><var>password</var></td>
<td>string</td>
</tr>
<tr>
<td width="50%"><var>enabled</var></td>
<td>integer (0 or 1)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates a new player account with the specified account name, password.</td></tr>
<tr><td colspan="2">Notes: If enabled == 0, player cannot log in.</td></tr>
<tr><td colspan="2">Only accepts Alphanumeric characters for account name. Control characters, '{' '}', and spaces not allowed.</td></tr>
<tr><td colspan="2">Passwords cannot contain whitespace or control characters.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Account Reference for the new account on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Account already exists"</td></tr>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Attempted to create account with non-alphanumeric characters."</td></tr>
<tr><td colspan="2">"Attempted to use password in account creation with non-allowed characters."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Account"><b>Account</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateItemAtLocation">CreateItemAtLocation( x, y, z, objtype, amount := 1, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer objtype, OR String ObjtypeName, OR GetItemDescriptor struct.</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>Integer (0..60000)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates an item at an arbitrary location. </td></tr>
<tr><td colspan="2"> Amount specifies how large the stack should be. </td></tr>
<tr><td colspan="2">Runs the item's create script, if any.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Item Reference on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"That item is not stackable.  Create one at a time."</td></tr>
<tr><td colspan="2">"Unable to create item of objtype X"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#itemdesc.cfg"><b>itemdesc.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateItemCopyAtLocation">CreateItemCopyAtLocation(x, y, z, item, realm := _DEFAULT_REALM)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">makes a clone of the item
      referenced with "itemref" at location x,y,z. Copies member variables and CProps. Does
      not work with Multi objects. Does not copy a container's contents.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A new Item Reference</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"Unable to clone item"</td></tr>
<tr><td colspan="2">"This function does not work with Multi objects."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#itemdesc.cfg"><b>itemdesc.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateItemInBackpack">CreateItemInBackpack( of_character, objtype, amount := 1 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>of_character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer objtype, OR String ObjtypeName, OR GetItemDescriptor struct.</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>Integer (optional, 0..60000)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates an item in a character's backpack. </td></tr>
<tr><td colspan="2">Notes: Adds to an existing stack in the top level of the container, if an appropriate stack can be found (meaning, can hold the new amount, the existing item stack has color equal to its itemdesc.cfg color property AND has equal CProps as its itemdesc.cfg entry (not counting locally and globally ignored cprops).  If no appropritate stack is found, creates a new stack. </td></tr>
<tr><td colspan="2">Runs the item's create script, if any.</td></tr>
<tr><td colspan="2">Calls the container's canInsert and onInsert scripts, if any.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Item Reference on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"A parameter was invalid."</td></tr>
<tr><td colspan="2">"Character has no backpack."</td></tr>
<tr><td colspan="2">"That item is not stackable.  Create one at a time."</td></tr>
<tr><td colspan="2">"That container is full"</td></tr>
<tr><td colspan="2">"Failed to create that item type"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="configfiles.html#itemdesc.cfg"><b>itemdesc.cfg</b></a></td></tr>
<tr><td colspan="2"><a href="configfiles.html#stacking.cfg"><b>stacking.cfg</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateItemInContainer">CreateItemInContainer( container, objtype, amount := 1 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>container</var></td>
<td>Container Reference</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer objtype, OR String ObjtypeName, OR GetItemDescriptor struct.</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>Integer (optional, 0..60000)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates an item in a container. </td></tr>
<tr><td colspan="2">Notes: Adds to an existing stack in the top level of the container, if an appropriate stack can be found (meaning, can hold the new amount, the existing item stack has color equal to its itemdesc.cfg color property AND has equal CProps as its itemdesc.cfg entry (not counting locally and globally ignored cprops).  If no appropritate stack is found, creates a new stack. </td></tr>
<tr><td colspan="2">Runs the item's create script, if any.</td></tr>
<tr><td colspan="2">Calls the container's canInsert and onInsert scripts, if any.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Item Reference on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
<tr><td colspan="2">"That is not a container"</td></tr>
<tr><td colspan="2">"That item is not stackable.  Create one at a time."</td></tr>
<tr><td colspan="2">"That container is full"</td></tr>
<tr><td colspan="2">"Failed to create that item type"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="configfiles.html#itemdesc.cfg"><b>itemdesc.cfg</b></a></td></tr>
<tr><td colspan="2"><a href="configfiles.html#stacking.cfg"><b>stacking.cfg</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateItemInInventory">CreateItemInInventory( container, objtype, amount := 1 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>container</var></td>
<td>Container reference</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer objtype for item to be created, OR String ObjtypeName, OR GetItemDescriptor struct.</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>size of stack to be created. Default = 1</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates a stack of items in the specified container. As usual, objtype
  must be valid and amount must be 1..60000. FORCES STACKING: If the specified obytpe is not stackable 
by 
  default (i.e. most weapons), this function WILL CREATE A STACK! This will cause a client crash if 
container 
  is a player's pack! Therefore, this function SHOULD ONLY BE USED WITH NPC MERCHANTS' STORAGE AREA 
  INVENTORIES! For normal containers, use CreateItemInContainer().
  </td></tr>
<tr><td colspan="2">Note: Will call the container's canInsert and onInsert scripts.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Item reference or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
<tr><td colspan="2">"That is not a container" if container.isa(POLCLASS_CONTAINER) == false</td></tr>
<tr><td colspan="2">"That container is full" if weight would be &gt; 65535, or if would exceed maximum # of items</td></tr>
<tr><td colspan="2">"Failed to create that item type"</td></tr>
<tr><td colspan="2">"Could not insert item into container." if canInsert script returns false</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#itemdesc.cfg"><b>itemdesc.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateMenu">CreateMenu( title )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>title</var></td>
<td>String</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Creates an empty dynamic "old-style item selection" menu. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A dynamic menu reference if the menu was created successfully</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on invalid parameter)</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateMultiAtLocation">CreateMultiAtLocation( x, y, z, objtype, flags := 0, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer objtype, OR String ObjtypeName, OR GetItemDescriptor struct.</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates a "multi" object (house or boat) at a location.</td></tr>
<tr><td colspan="2">Notes: uo.em constants for flags:
</td></tr>
<tr><td colspan="2"><pre>
houses only:
const CRMULTI_IGNORE_MULTIS     := 0x0001; //ignore intersecting multis
const CRMULTI_IGNORE_OBJECTS    := 0x0002; //ignore dynamic objects
const CRMULTI_IGNORE_WORLDZ     := 0x0004; //ignore standability,relative Z,world height
const CRMULTI_IGNORE_ALL        := 0x0007; </pre></td></tr>
<tr><td colspan="2">objtype must be a multi type as defined in itemdesc.cfg having a type House or Boat.</td></tr>
<tr><td colspan="2">For Boats: Position must be passable - every part of the hull sits on water, and no 
                hull location is occupied by the hull of another ship, nor a static or 
                dynamic blocking item. 
              Runs scripts/misc/boat.ecl on creation.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Boat Reference or House Reference on success, and adds the multi to the world</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"That location is out of bounds"</td></tr>
<tr><td colspan="2">"That objtype is not a Multi"</td></tr>
<tr><td colspan="2">"Don't know what kind of multi to make"</td></tr>
<tr><td colspan="2">Boats:</td></tr>
<tr><td colspan="2">   "Multi definition not found for Boat, objtype=X, graphic=Y"</td></tr>
<tr><td colspan="2">   "No boatshape for Boat in boats.cfg, objtype=X, graphic=Y"</td></tr>
<tr><td colspan="2">     "Position indicated is impassable"</td></tr>
<tr><td colspan="2">Houses:</td></tr>
<tr><td colspan="2">   "Multi definition not found for House, objtype=X, graphic=Y"</td></tr>
<tr><td colspan="2">   "Location intersects with another structure" (use CRMULTI_IGNORE_MULTIS)</td></tr>
<tr><td colspan="2">   "Something is blocking that location" (use CRMULTI_IGNORE_OBJECTS)</td></tr>
<tr><td colspan="2">   "That location is not suitable" (use CRMULTI_IGNORE_WORLDZ)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#House"><b>House</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Boat"><b>Boat</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="CreateNpcFromTemplate">CreateNpcFromTemplate( template, x, y, z, override_properties := 0, realm := _DEFAULT_REALM)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>template</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>override_properties</var></td>
<td>A Struct with keys as String members and values as appropriate (see notes)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates an NPC from a template (found in NPCDESC.CFG).</td></tr>
<tr><td colspan="2">Notes: override_properties: a structure containing members to override values in the 
        NPC template. This can be used to override built-in properties (facing, 
        color, gender etc) and custom properties ("CProps" = dictionary {key=cpropname value=cpropvalue})</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Character Reference on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Parameter 4 must be a Struct or Integer(0)"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"NPC template 'X' not found"</td></tr>
<tr><td colspan="2">"Not a valid location for an NPC!"</td></tr>
<tr><td colspan="2">"Exception detected trying to create npc from template 'X'"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#npcdesc.cfg"><b>npcdesc.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="DestroyItem">DestroyItem( Item )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>Item</var></td>
<td>Item Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Removes an item from the world.  Transmits commands to each client in range of item to reflect this.</td></tr>
<tr><td colspan="2">Notes: runs the Item's destroy script, if any.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">1 if the item was destroyed</td></tr>
<tr><td colspan="2">0 if the item's destroy script disallowed destruction</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"That item is being used."</td></tr>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="DestroyMulti">DestroyMulti( multi )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>multi</var></td>
<td>Multi Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Deletes a Multi item from the world.</td></tr>
<tr><td colspan="2">Notes: House: Moves all characters and items inside multi to ground.
         Boat: Requires hold be empty, deck be empty, and have no mobiles logged-out on boat.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"WTF!? Don't know what kind of multi that is!" if not a boat or a house</td></tr>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">Boat Errors:"There is cargo in the ship's hold"</td></tr>
<tr><td colspan="2">"There are logged-out characters on the deck"</td></tr>
<tr><td colspan="2">"The deck is not empty"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#House"><b>House</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Boat"><b>Boat</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Detach">Detach()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Disassociates the current script from the character that it is attached to. See Attach() too.</td></tr>
<tr><td colspan="2">If the current script is not attached to a character, does nothing.</td></tr>
<tr><td colspan="2">Example: a spell script for both  doing the spell, implementing a temporary spell effect on
an object, and removing the effect after an amount of time:
</td></tr>
<tr><td colspan="2"><pre>
Program Spell(who)
    // Test, if spell possible (reagents, mana, line of sight, etc..)
    // Do the spell, animations, etc.
    // Now something is changed, a temporary effect is installed to an
object, this effect will expire in n seconds
    // Detach the script from the caster
    Detach(); //this allows other scripts to run on this character during the below sleep()
    sleep(n); //delay until effect time is elapsed
    // End the effect, and return
endprogram</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success (the script was attached to a character, and is no longer.)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on failure (character invalid))</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="DisableEvents">DisableEvents( eventtype )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>eventtype</var></td>
<td>integer combination (bitwise-OR) of constants from SYSEVENT.INC</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Disables the system event(s) defined in sysevent.inc for the current NPC or item control script. Do not use for "user" events (see EnableEvents()).</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">New event mask on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="DisconnectClient">DisconnectClient( character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Disconnects the character's client.</td></tr>
<tr><td colspan="2">Notes: Fun!</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"No client is attached"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Distance">Distance( object1, object2 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object1</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>object2</var></td>
<td>UObject Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Determines the distance between two objects.  If either object is in a container, 
        uses the world-position of its ultimate-parent container. </td></tr>
<tr><td colspan="2">Notes: This distance is defined as the greater of the x-distance and the y-distance. z-distance 
       is not taken into account.  (This is neither Pythagorean distance nor Manhattan distance) </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer - calculated distance on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="EnableEvents">EnableEvents( events, range := -1 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>events</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer (optional, 0..32)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Enables events specified. When enabled events occur, they will be placed on the 
        script's event queue, and must be read with wait_for_event.  Events that were 
        previously enabled will remain enabled. </td></tr>
<tr><td colspan="2">Notes: See include/sysevent.inc for event type constants.  DO NOT use this function for 
         non-system event IDs. For user-created events, just send the event, no need to enable
         it first.</td></tr>
<tr><td colspan="2">This function is useful only to NPCs and Items that have called RegisterForSpeechEvents.</td></tr>
<tr><td colspan="2">Range is only used for certain events (currently speech, and entered/leftarea events)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer new event "mask" on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="EnumerateItemsInContainer">EnumerateItemsInContainer( container, flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>container</var></td>
<td>Container Reference</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Returns an array of the contents of a container.</td></tr>
<tr><td colspan="2">Notes: If 'container' is itself locked, its contents will still be enumerated. </td></tr>
<tr><td colspan="2">Notes: uo.em constant for this function:
</td></tr>
<tr><td colspan="2"><pre>
const ENUMERATE_IGNORE_LOCKED := 1; // List content of locked container</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An Array of Item References on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">none (returns 0 on different errors)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="EnumerateOnlineCharacters">EnumerateOnlineCharacters()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Gets a list of all online player characters.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An Array of Character References on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="EquipFromTemplate">EquipFromTemplate( character, template )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>template</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Creates equipment for a character, using EQUIP.CFG. </td></tr>
<tr><td colspan="2">Notes: Element properties in EQUIP.CFG can have the following formats:
      Equip [hex_objtype] [hex_color]
      Armor [armor_template_name]
      Weapon [weapon_template_name]
      Note that object type and color must be in hex format (0xHHHH) </td></tr>
<tr><td colspan="2">Will not create an item that is not equippable.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Equipment template not found"</td></tr>
<tr><td colspan="2">"Blech! Can't find '[object name]' named in equip.cfg"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Equipment"><b>Equipment</b></a></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#equip.cfg"><b>equip.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="EquipItem">EquipItem( mobile, item )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>mobile</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Equips an item on a mobile. </td></tr>
<tr><td colspan="2">Notes: If item is in a container, it will be removed from the container.</td></tr>
<tr><td colspan="2">"Equippable" means that the character does not have a similar item equipped, and that the item is an equipment-type item.</td></tr>
<tr><td colspan="2">Carrying-capacity and strength requirements will fall under this category as well.</td></tr>
<tr><td colspan="2">To "unequip" an item, move it to another location (typically a backpack)</td></tr>
<tr><td colspan="2">Runs the Item's Equiptest and Equip scripts, if any.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">1 if the item was equipped succesfully</td></tr>
<tr><td colspan="2">0 if the item's Equip script returned false</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"That is immobile"</td></tr>
<tr><td colspan="2">"That item is being used."</td></tr>
<tr><td colspan="2">"That item is not equippable by that character" if equiptest script failed.</td></tr>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="EraseGlobalProperty">EraseGlobalProperty( propertyname )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>propertyname</var></td>
<td>String</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Removes a property from the global property list. propertyname is case-sensative</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the property was erased or did not exist.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="EraseObjProperty">EraseObjProperty( object, propertyname )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>propertyname</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Removes a property from the custom-property ("cprop") list of an object. propertyname is case-sensative</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the property was erased or did not exist.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="FindAccount">FindAccount( acctname )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>acctname</var></td>
<td>string</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Gets a player Account Reference by the name of the account.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Account Reference on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Account not found."</td></tr>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Account"><b>Account</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="FindObjtypeInContainer">FindObjtypeInContainer( container, objtype )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>container</var></td>
<td>Container reference</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>integer objtype to find</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Returns an Item Reference to the first found item matching objtype starting in "container".</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Item reference or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"That is not a container" if container.isa(POLCLASS_CONTAINER) == false</td></tr>
<tr><td colspan="2">"No items were found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="FindPath">FindPath( x1, y1, z1, x2, y2, z2, realm := _DEFAULT_REALM, flags := FP_IGNORE_MOBILES, searchskirt := 5 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x1,y1,z1</var></td>
<td>Integer world coordinates - start of the path</td>
</tr>
<tr>
<td width="50%"><var>x2,y2,z2</var></td>
<td>Integer world coordinates - destination</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>searchskirt</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Finds a path from start to destination and will return an array of coordinates, representing each step along the path from the next step to take from the start of the path to the actual destination.  The coordinates are found in .x, .y, and .z.</td></tr>
<tr><td colspan="2">Notes: The skirt around the square that is formed around the start of the path to the destination which represents the searchable area is set by searchskirt. Check out MaxPathFindRange in servspecopt.cfg too.</td></tr>
<tr><td colspan="2">Notes: uo.em constant for this function:
</td></tr>
<tr><td colspan="2"><pre>
// FindPath flags
const FP_IGNORE_MOBILES         := 0x01;    // ignore Mobiles
const FP_IGNORE_DOORS           := 0x02;    // ignore Doors (you've to open doors by yourself)</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Error or Array of coordinates, representing each step along the path.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Start Coordinates Invalid for Realm"</td></tr>
<tr><td colspan="2">"End Coordinates Invalid for Realm"</td></tr>
<tr><td colspan="2">"Beyond Max Range."</td></tr>
<tr><td colspan="2">"Failed to find a path."</td></tr>
<tr><td colspan="2">"Out of memory."</td></tr>
<tr><td colspan="2">"Solution Corrupted!"</td></tr>
<tr><td colspan="2">"Pathfind Error."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="FindSubstance">FindSubstance( container, objtype, amount, makeinuse := 0, flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>container</var></td>
<td>Container reference</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer objtype to find</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>makeinuse</var></td>
<td>Integer (0/1)</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Search the given container for items of objtype in an amount equal or greater than the amount given (stackables can return greater than #).</td></tr>
<tr><td colspan="2">If makeinuse is set to 1, then the items will be reserved.</td></tr>
<tr><td colspan="2">uo.em constants for flags:
  </td></tr>
<tr><td colspan="2"><pre>
// FindSubstance constants
const FINDSUBSTANCE_IGNORE_LOCKED := 0x1; // Find matches in locked containers
const FINDSUBSTANCE_ROOT_ONLY     := 0x2; // Do not find matches in sub-containers.
const FINDSUBSTANCE_FIND_ALL      := 0x4; // Find all matches ignoring given amount</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">If sufficient # of items have been found, those found (and possibly reserved) will be returned in an array.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"That is not a container"</td></tr>
<tr><td colspan="2">"Amount cannot be negative"</td></tr>
<tr><td colspan="2">"Not enough of that substance in container"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetAmount">GetAmount( item )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Returns size of item stack.</td></tr>
<tr><td colspan="2">probably better to use item.amount</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer  size of item's stack on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on invalid parameter)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetCommandHelp">GetCommandHelp( character, command )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>command</var></td>
<td>string</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets a help message for a textcommand, if one is defined.</td></tr>
<tr><td colspan="2">Notes: Help files are found in commandname.txt in the same directory as the command script.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">String with help information</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No help for that command found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetCoordsInLine">GetCoordsInLine(x1, y1, x2, y2)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x1,y1</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>x2,y2</var></td>
<td>Integer world coordinates</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Calculates every coordinate between the two points.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Structs {.x, .y}</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetEquipmentByLayer">GetEquipmentByLayer( character, layer )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>Character</var></td>
<td>Character reference</td>
</tr>
<tr>
<td width="50%"><var>layer</var></td>
<td>An integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Gets an item reference to an equipped item. For proper layer values, see 
scripts/include/client.inc</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Itemref or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid layer"</td></tr>
<tr><td colspan="2">"Nothing equipped on that layer."</td></tr>
<tr><td colspan="2">"Invalid parameter"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetFacing">GetFacing(from_x, from_y, to_x, to_y)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>from_x,from_y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>to_x,to_y</var></td>
<td>Integer world coordinates</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Returns the facing number an object must have in order to face to_x and to_y from from_x and from_y.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Facing number</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetGlobalProperty">GetGlobalProperty( propertyname )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>propertyname</var></td>
<td>String</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Retrieves the value of a global property. propertyname is case-sensative</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">On success a script object (string, integer, real, array, etc) containing the value of the named property</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Property not found"</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetGlobalPropertyNames">GetGlobalPropertyNames()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Gets all the global property names. Use GetGlobalProperty(returned_array[i]) to get the property value.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of strings</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetHarvestDifficulty">GetHarvestDifficulty( resource, x, y, tiletype, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>resource</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>tiletype</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Determines the difficulty of harvesting a resource from location (x,y). </td></tr>
<tr><td colspan="2">Notes: tiletype will typically be .objtype from TargetCoordinates() 
       Checks the location for an object of type 'tiletype'. This tiletype may be a 
         landtile or an object tile.</td></tr>
<tr><td colspan="2">"resource" is something like "ore" "wood" "fish", etc. see regions/resource.cfg,
       regions/ore.cfg, etc.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An integer difficulty level if resources exist.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"No resource by that name"</td></tr>
<tr><td colspan="2">"No resource-bearing landmark there"</td></tr>
<tr><td colspan="2">"No resource region at that location"</td></tr>
<tr><td colspan="2">"Resource is depleted"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#resource.cfg"><b>resource.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetMapInfo">GetMapInfo( x, y, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets information about map data at a location.</td></tr>
<tr><td colspan="2">Notes: Tells you nothing about Static items! 
       z = map height at x,y. Not necessarily the same as GetStandingHeight()
       landtile = the land tile type number at x,y (not an item graphic number)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A Struct with members "z" and "landtile".</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetMenuObjTypes">GetMenuObjTypes( menuname )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>menuname</var></td>
<td>static or dynamic menu</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets all the objtypes contained in the menu. </td></tr>
<tr><td colspan="2">Notes: see CreateMenu(), AddMenuItem()</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of objtypes contained in the given menu.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (instead returns 0 on failure)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetMultiDimensions">GetMultiDimensions( graphic )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>graphic</var></td>
<td>Multi Graphic ID</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Returns struct with coords of _relative_ distances from center. xmin and ymin are _negative_.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Struct with "xmin", "xmax", "ymin", "ymax".</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Multi Graphic not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Multi"><b>Multi</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetObjProperty">GetObjProperty( object, propertyname )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>propertyname</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Retrieves custom data (a "cprop") associated with an object. propertyname is case-sensative</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">On success, the unpacked object that was saved with SetObjProperty. This could be a
       string, integer, real, array, struct, dictionary, etc.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Property not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetObjPropertyNames">GetObjPropertyNames( object )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>object</var></td>
<td>UObject reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Gets all the CProp names set on the object. Use GetObjProperty(object, returned_array[i]) to get the 
CProp value.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of strings or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetObjType">GetObjType( object )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Returns the Objtype of an object. Same as ref.objtype. Works for item root classed and character root classed.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer ObjType or 0</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#itemdesc.cfg"><b>itemdesc.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetObjTypeByName">GetObjtypeByName( name )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>name</var></td>
<td>string</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Finds the matching Object Type number for the obejct named "name" Matches on the itemdesc.cfg property 
"Name".</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer ObjType or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"No objtype by that name"</td></tr>
<tr><td colspan="2">"Invalid parameter"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#itemdesc.cfg"><b>itemdesc.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetRegionName">GetRegionName( object )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>object</var></td>
<td>top level UObject (item/character/npc/etc)</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Get name of [justice] region that Object is in.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">String value of "Region Name" on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid Parameter"</td></tr>
<tr><td colspan="2">"No Region defined at this Location"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#regions.cfg"><b>regions.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetRegionNameAtLocation">GetRegionNameAtLocation( x, y, realm )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x</var></td>
<td>x location</td>
</tr>
<tr>
<td width="50%"><var>y</var></td>
<td>y location</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Get name of [justice] region for coordinates.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">String value of "Region Name" on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid Parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for realm"</td></tr>
<tr><td colspan="2">"No Region defined at this Location"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#regions.cfg"><b>regions.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetRegionString">GetRegionString( resource, x, y, propertyname, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>resource</var></td>
<td>string</td>
</tr>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>propertyname</var></td>
<td>string</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Allows you to look up custom properties within a resource region entry.</td></tr>
<tr><td colspan="2">"resource" is a string that matches a resource type in regions/resource.cfg, i.e. "ore". 
  x,y is the coordinate to look up in the regions defined in resources/ore.cfg (or the 
  filename matching the supplied resource).</td></tr>
<tr><td colspan="2">"property_name" is the _custom_ property to match (i.e. UnitsPerArea, SecondsPerRegrow, 
  Capacity, Range are NOT matched) in the found region.
          
</td></tr>
<tr><td colspan="2"><pre>
Example: in regions/resource.cfg there exists a ResourceType "ore". In ore.cfg 
         there exists a region:
Region Outer Covetous 
{ 
    UnitsPerArea        15 
    SecondsPerRegrow    300 
    Capacity            20000 
    Range        2299 784 2635 967 
    Prop         value_string    -- this is a custom property not used by the core
} 
GetRegionString("ore",2299,785,"Prop"); would return "value_string"</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">String value of "propertyname" on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"No resource by that name" if "resource" not found in regions/resource.cfg</td></tr>
<tr><td colspan="2">"No resource region at that location" if the given x,y is not defined inside any of the regions in regions/[resource string].cfg</td></tr>
<tr><td colspan="2">"Property not found" if "propertyname" was not found in the matching region.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#regions.cfg"><b>regions.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetSpellDifficulty">GetSpellDifficulty( spellid )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>spellid</var></td>
<td>Integer</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets spell "difficulty" based on spell circle number (config/circles.cfg).</td></tr>
<tr><td colspan="2">Notes: spells.cfg files define spells and spell ids.
       "Difficulty" values are used in the function CheckSkill()</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer difficulty value</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"No such spell"</td></tr>
<tr><td colspan="2">"Spell ID out of range"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#circles.cfg"><b>circles.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetStandingHeight">GetStandingHeight( x, y, startz, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>startx</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets the lowest z height value one could stand at x,y starting at "startz". </td></tr>
<tr><td colspan="2">Notes: For example, if there is a static tunnel under the map, using a startz value less than the
        tunnel floor would get you the z of the floor. Above that value would get you the 
        next possible standing height (i.e. on the map above).
       Also returns a multi reference if a multi exists at that location.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A Struct with members "z" and possibly "multi" (a Multi Reference)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"Can't stand there" if inaccessible location</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetStandingLayers">GetStandingLayers( x, y, flags := MAPDATA_FLAG_ALL, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Returns an Array of standing Layers and blocking Solids.</td></tr>
<tr><td colspan="2">mapdata flags:
</td></tr>
<tr><td colspan="2"><pre>
const MAPDATA_FLAG_NONE         := 0x0000;     // Nothing
const MAPDATA_FLAG_MOVELAND     := 0x0001;     // Move Land
const MAPDATA_FLAG_MOVESEA      := 0x0002;     // Move Sea
const MAPDATA_FLAG_BLOCKSIGHT   := 0x0004;     // Block Sight
const MAPDATA_FLAG_OVERFLIGHT   := 0x0008;     // Over Flight
const MAPDATA_FLAG_ALLOWDROPON  := 0x0010;     // Allow DropOn
const MAPDATA_FLAG_GRADUAL      := 0x0020;     // Gradual
const MAPDATA_FLAG_BLOCKING     := 0x0040;     // Blocking
const MAPDATA_FLAG_MORE_SOLIDS  := 0x0080;     // List more Solids

const MAPDATA_FLAG_WALKBLOCK    := 0x0057;     // Move Land, Move Sea, Blocking, Block Sight, Allow DropOn
const MAPDATA_FLAG_MOVE_FLAGS   := 0x0063;     // Move Land, Move Sea, Blocking, Gradual
const MAPDATA_FLAG_DROP_FLAGS   := 0x0050;     // Blocking, Allow DropOn
const MAPDATA_FLAG_ALL          := 0xffffffff; // All</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Structs with members "z", "height" and "flags" at that location or Error.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Struct"><b>Struct</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GetWorldHeight">GetWorldHeight( x, y, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Gets the lowest standing height at x,y</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">z value of lowest standing height</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"Location out of bounds"</td></tr>
<tr><td colspan="2">"Nowhere" if one could not stand at any z value of x,y</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="GrantPrivilege">GrantPrivilege( character, privilege )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>privilege</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Grants a privilege to a character. </td></tr>
<tr><td colspan="2">Notes: see some other doc for a list of privs and their functions</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 f the privilege was granted successfully</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="HarvestResource">HarvestResource( resource, x, y, b, n, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>resource</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>b</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>n</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Attempts to harvest a resource from a location.</td></tr>
<tr><td colspan="2">Notes: Harvests a*b resource units, where 0 is less than or equal to 'a'  and 'a' is less than or 
equal to n.  Thus you can request 0-40  units in groups of 5, etc. </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer number of resource units harvested if resources were harvested, or 0 if 
         no resources were available.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter" </td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"No resource by that name"</td></tr>
<tr><td colspan="2">"No resource region at that location"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#resource.cfg"><b>resource.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="IsStackable">IsStackable( item1, item2 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>item1</var></td>
<td>Item 1</td>
</tr>
<tr>
<td width="50%"><var>item2</var></td>
<td>Item 2</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Compares 2 items to determine if they can be stacked together.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the 2 items can be stacked, 0 if not or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListAccounts">ListAccounts()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Gets a list of all account names.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Strings of account names.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Account"><b>Account</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListEquippedItems">ListEquippedItems( who )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>who</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Returns a list of items current equipped on character referenced by "who"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Item References equipped on "who"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListGhostsNearLocation">ListGhostsNearLocation( x, y, z, range, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Searches the world for ghosts within "range" squares of (x,y,z).</td></tr>
<tr><td colspan="2">Notes: 19 is used for the z-range.  
         Rectangular range is used - x-range and y-range are compared independently 
      This call is equivalent to ListMobilesNearLocationEx( x, y, z, range, LISTEX_GHOST, realm ).
          For this reason, this function is depreciated.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An array of Character References of ghosts found near the location on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListHostiles">ListHostiles( character, range := 20, flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>integer (optional, default=20)</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>integer (optional, default=0)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets a list of Character References that are hostile (i.e. attacking) "character"</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
const LH_FLAG_LOS               := 1;       // only include those in LOS
const LH_FLAG_INCLUDE_HIDDEN    := 2;       // include hidden characters</pre></td></tr>
<tr><td colspan="2">Will NOT find "concealed" characters.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Character References hostile to "character"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListItemsAtLocation">ListItemsAtLocation( x, y, z, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Returns a list of items at the specified x,y,z. test ret != 0</td></tr>
<tr><td colspan="2">Use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">&lt;uninitialized object&gt; if invalid parameters, or Array of Item References of items at that location.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListItemsNearLocation">ListItemsNearLocation( x, y, z, range, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Searches the world for items within range squares of (x,y,z).</td></tr>
<tr><td colspan="2">Notes: 19 is used for the Z-Range or use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.
    Rectangular range is used - x-range and y-range are compared independently.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">&lt;uninitialized object&gt; if invalid parameters, or Array of Item References of Items found near the location.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListItemsNearLocationOfType">ListItemsNearLocationOfType( x, y, z, range, objtype, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Searches the world for items within range squares of (x,y,z) of type objtype.</td></tr>
<tr><td colspan="2">Notes: 19 is used for the Z-Range or use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.
    Rectangular range is used - x-range and y-range are compared independently.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">&lt;uninitialized object&gt; if invalid parameters, or Array of Item References of Items matching "objtype" found near the location.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListItemsNearLocationWithFlag">ListItemsNearLocationWithFlag( x, y, z, range, flags, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets an array of itemrefs if its graphic matches any of the OR'd flags passed. "flags" here are 
    tiledata.mul flags for the item's graphic.</td></tr>
<tr><td colspan="2">Tiledata.mul flags:
</td></tr>
<tr><td colspan="2"><pre>
const TILEDATA_FLAG_BACKGROUND  := 0x00000001; //Background
const TILEDATA_FLAG_WEAPON      := 0x00000002; //Weapon
const TILEDATA_FLAG_TRANSPARENT := 0x00000004; //Transparent
const TILEDATA_FLAG_TRANSLUCENT := 0x00000008; //Translucent
const TILEDATA_FLAG_WALL        := 0x00000010; //Wall
const TILEDATA_FLAG_DAMAGING    := 0x00000020; //Damaging
const TILEDATA_FLAG_IMPASSABLE  := 0x00000040; //Impassable
const TILEDATA_FLAG_WET         := 0x00000080; //Wet
const TILEDATA_FLAG_UNK         := 0x00000100; //Unknown
const TILEDATA_FLAG_SURFACE     := 0x00000200; //Surface
const TILEDATA_FLAG_BRIDGE      := 0x00000400; //Bridge
const TILEDATA_FLAG_STACKABLE   := 0x00000800; //Generic/Stackable
const TILEDATA_FLAG_WINDOW      := 0x00001000; //Window
const TILEDATA_FLAG_NOSHOOT     := 0x00002000; //No Shoot
const TILEDATA_FLAG_PREFIX_A    := 0x00004000; //Prefix A
const TILEDATA_FLAG_PREFIX_AN   := 0x00008000; //Prefix An
const TILEDATA_FLAG_INTERNAL    := 0x00010000; //Internal (things like hair, beards, etc)
const TILEDATA_FLAG_FOILIAGE    := 0x00020000; //Foliage
const TILEDATA_FLAG_PARTIAL_HUE := 0x00040000; //Partial Hue
const TILEDATA_FLAG_UNK1        := 0x00080000; //Unknown 1
const TILEDATA_FLAG_MAP         := 0x00100000; //Map
const TILEDATA_FLAG_CONTAINER   := 0x00200000; //Container
const TILEDATA_FLAG_WEARABLE    := 0x00400000; //Wearable
const TILEDATA_FLAG_LIGHTSOURCE := 0x00800000; //LightSource
const TILEDATA_FLAG_ANIMATED    := 0x01000000; //Animated
const TILEDATA_FLAG_NODIAGONAL  := 0x02000000; //No Diagonal
const TILEDATA_FLAG_UNK2        := 0x04000000; //Unknown 2
const TILEDATA_FLAG_ARMOR       := 0x08000000; //Armor
const TILEDATA_FLAG_ROOF        := 0x10000000; //Roof
const TILEDATA_FLAG_DOOR        := 0x20000000; //Door
const TILEDATA_FLAG_STAIRBACK   := 0x40000000; //StairBack
const TILEDATA_FLAG_STAIRRIGHT  := 0x80000000; //StairRight</pre></td></tr>
<tr><td colspan="2">Notes: 19 is used for the Z-Range or use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.
    Rectangular range is used - x-range and y-range are compared independently.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Item References of Items matching "flags" found near the location or Error.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListMobilesInLineOfSight">ListMobilesInLineOfSight( object, range )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Gets list of mobiles in line of sight of "object", maximum "range" tiles away.</td></tr>
<tr><td colspan="2">Notes: Finds living, non-hidden mobiles within range tiles of object, that have LOS with it. </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An Array of Character References on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListMobilesNearLocation">ListMobilesNearLocation( x, y, z, range, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Searches the world for mobiles within range squares of (x,y,z).</td></tr>
<tr><td colspan="2">Notes: Finds living, non-hidden mobiles found near the location. </td></tr>
<tr><td colspan="2">Notes: 19 is used for the Z-Range or use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.
    Rectangular range is used - x-range and y-range are compared independently.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An Array of Character References</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListMobilesNearLocationEx">ListMobilesNearLocationEx( x, y, z, range, flags, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Searches the world for mobiles within range squares of (x,y,z).</td></tr>
<tr><td colspan="2">Notes: uo.em constants for flags - include mobile types:
</td></tr>
<tr><td colspan="2"><pre>
const LISTEX_FLAG_NORMAL := 0x01;
const LISTEX_FLAG_HIDDEN := 0x02;
const LISTEX_FLAG_GHOST  := 0x04;
const LISTEX_FLAG_CONCEALED  := 0x08;</pre></td></tr>
<tr><td colspan="2">Notes: 19 is used for the Z-Range or use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.
    Rectangular range is used - x-range and y-range are compared independently.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">An Array of Character References of mobiles found matching the search criteria. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListMultisInBox">ListMultisInBox( x1,y1,z1, x2,y2,z2, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x1,y1,z1</var></td>
<td>integer, for north west upper corner of box</td>
</tr>
<tr>
<td width="50%"><var>x2,y2,z2</var></td>
<td>integer, for south east lower corner of box</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Lists all multis inside an imaginary box (where a multi must have at least one 'static' piece inside the box)</td></tr>
<tr><td colspan="2">Notes: This function will not generate "Invalid Coordinates for realm" Error, because some Scripter "loves" this "bug" :o/</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Error or Array of all multis found inside the specified box.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#House"><b>House</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Boat"><b>Boat</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListObjectsInBox">ListObjectsInBox( x1,y1,z1, x2,y2,z2, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x1,y1,z1</var></td>
<td>integer, for north west upper corner of box</td>
</tr>
<tr>
<td width="50%"><var>x2,y2,z2</var></td>
<td>integer, for south east lower corner of box</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Lists all items &amp; mobiles inside an imaginary box. Finds both characters (PCs &amp; NPCs) and items</td></tr>
<tr><td colspan="2">Notes: This function will not generate "Invalid Coordinates for realm" Error, because some Scripter "loves" this "bug" :o/</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Error or Array of all characters and items found inside the specified box.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListStaticsAtLocation">ListStaticsAtLocation( x, y, z, flags := 0, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Returns a list of Static or Multi Items at the specified x,y,z.</td></tr>
<tr><td colspan="2">Use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// ListStatics* flags
const ITEMS_IGNORE_STATICS      := 0x01;    // Don't list Static Items
const ITEMS_IGNORE_MULTIS       := 0x02;    // Don't list Multi Items

// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Structs with members "x", "y", "z" and "objtype" or Error.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListStaticsInBox">ListStaticsInBox( x1,y1,z1, x2,y2,z2, flags := 0, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x1,y1,z1</var></td>
<td>integer, for north west upper corner of box</td>
</tr>
<tr>
<td width="50%"><var>x2,y2,z2</var></td>
<td>integer, for south east lower corner of box</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Lists all Static or Multi Items inside an imaginary box.</td></tr>
<tr><td colspan="2">Notes: This function will not generate "Invalid Coordinates for realm" Error, because some Scripter "loves" this "bug" :o/</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// ListStatics* flags
const ITEMS_IGNORE_STATICS      := 0x01;    // Don't list Static Items
const ITEMS_IGNORE_MULTIS       := 0x02;    // Don't list Multi Items</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Structs with members "x", "y", "z" and "objtype" or Error.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ListStaticsNearLocation">ListStaticsNearLocation( x, y, z, range, flags := 0, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Searches the world for Static or Multi Items within range squares of (x,y,z).</td></tr>
<tr><td colspan="2">Notes: 19 is used for the Z-Range or use LIST_IGNORE_Z constant as Z Parameter to list all Items ignoring Z-Value.
    Rectangular range is used - x-range and y-range are compared independently.</td></tr>
<tr><td colspan="2">Notes: from uo.em constants:
</td></tr>
<tr><td colspan="2"><pre>
// ListStatics* flags
const ITEMS_IGNORE_STATICS      := 0x01;    // Don't list Static Items
const ITEMS_IGNORE_MULTIS       := 0x02;    // Don't list Multi Items

// special value for List[Items/Mobiles/Statics]*
const LIST_IGNORE_Z             := 0x40000000; // Ignore Z-Value and list everything</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Array of Structs with members "x", "y", "z" and "objtype" or Error.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="MoveItemToContainer">MoveItemToContainer( item, container, x := -1, y := -1 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
<tr>
<td width="50%"><var>container</var></td>
<td>Container Reference</td>
</tr>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer coords inside container gump (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Moves an item into a container.</td></tr>
<tr><td colspan="2">Notes: If the default values for x and y are passed, or if x or y does not fall within the
       legal bounds for a container as found in ITEMDESC.CFG, then a random location 
       within the container will be chosen. </td></tr>
<tr><td colspan="2">Calls the item's unequiptest and unequip scripts, if any.</td></tr>
<tr><td colspan="2">Calls the container's canInsert and onInsert scripts, if any.</td></tr>
<tr><td colspan="2">Calls the item's original container's (if any) canRemove and onRemove scripts, if any.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"That is immobile"</td></tr>
<tr><td colspan="2">"That item is being used."</td></tr>
<tr><td colspan="2">"Non-container selected as target"</td></tr>
<tr><td colspan="2">"Can't put a container into itself"</td></tr>
<tr><td colspan="2">"Can't put a container into an item in itself"</td></tr>
<tr><td colspan="2">"Container is too full to add that"</td></tr>
<tr><td colspan="2">"Item cannot be unequipped"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="MoveItemToSecureTradeWin">MoveItemToSecureTradeWin( item, character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Move item to secure trade window via script.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"That is immobile"</td></tr>
<tr><td colspan="2">"That item is being used."</td></tr>
<tr><td colspan="2">"Could not remove item from its container."</td></tr>
<tr><td colspan="2">"Item was destroyed in CanRemove script"</td></tr>
<tr><td colspan="2">"Item cannot be unequipped"</td></tr>
<tr><td colspan="2">"Item was destroyed in Equip Script"</td></tr>
<tr><td colspan="2">"Item was destroyed in OnRemove script"</td></tr>
<tr><td colspan="2">"Unable to complete trade"</td></tr>
<tr><td colspan="2">"That's too heavy to trade."</td></tr>
<tr><td colspan="2">"Something went wrong with trade window."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="MoveObjectToLocation">MoveObjectToLocation( object, x, y, z, realm := _DEFAULT_REALM, flags := MOVEOBJECT_NORMAL )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>Object Reference</td>
</tr>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Moves an Object to a location in the world and/or from one realm to another realm.</td></tr>
<tr><td colspan="2">Function will replace MoveCharacterToLocation(), MoveItemToLocation(), and MoveObjectToRealm().</td></tr>
<tr><td colspan="2">Currently moves boats, mobiles, and items.</td></tr>
<tr><td colspan="2">Notes: If MOVEOBJECT_FORCELOCATION is not passed with flags, z-coordinate passed is used as a hint.  
       The object will be placed on the the ground, or on an item, or on a ship.
       If it is set, the z location of the object is forced.</td></tr>
<tr><td colspan="2">Notes: If MOVEITEM_IGNOREMOVABLE is set movable member is ignored.</td></tr>
<tr><td colspan="2">Notes: If item is equipped, its unequiptest and unequip scripts are run, if any.</td></tr>
<tr><td colspan="2">Notes: Calls the item's original container's canRemove and onRemove scripts, if any.</td></tr>
<tr><td colspan="2">uo.em constants for flags:
</td></tr>
<tr><td colspan="2"><pre>
// Constants for MoveObjectToLocation
//
const MOVEOBJECT_NORMAL   := 0x0;
const MOVEITEM_IGNOREMOVABLE := 0x20000000;
const MOVEOBJECT_FORCELOCATION  := 0x40000000;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
<tr><td colspan="2">"Can't handle that object type yet."</td></tr>
<tr><td colspan="2">Can't move multis at this time.</td></tr>
<tr><td colspan="2">Mobile:</td></tr>
<tr><td colspan="2">"Can't go there"</td></tr>
<tr><td colspan="2">Boat:</td></tr>
<tr><td colspan="2">"Position indicated is impassable"</td></tr>
<tr><td colspan="2">Item or Container:</td></tr>
<tr><td colspan="2">"That is immobile"</td></tr>
<tr><td colspan="2">"That item is being used."</td></tr>
<tr><td colspan="2">"Location (x, y, z) is out of bounds"</td></tr>
<tr><td colspan="2">"Invalid location selected"</td></tr>
<tr><td colspan="2">"Could not remove item from its container."</td></tr>
<tr><td colspan="2">"Item was destroyed in CanRemove script"</td></tr>
<tr><td colspan="2">"Item cannot be unequipped"</td></tr>
<tr><td colspan="2">"Item was destroyed in Equip script"</td></tr>
<tr><td colspan="2">"Item was destroyed in OnRemove script"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Boat"><b>Boat</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="OpenPaperdoll">OpenPaperdoll( towhom, forwhom )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>towhom</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>forwhom</var></td>
<td>Character Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends the paperdoll gump to a character.</td></tr>
<tr><td colspan="2">Notes: "towhom" gets the paperdoll for character "forwhom"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PerformAction">PerformAction( character, action, framecount:=5, repeatcount:=1, backward:=ACTION_DIR_FORWARD, repeatflag:=ACTION_NOREPEAT, delay:=1 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>action</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>framecount</var></td>
<td>Integer (Optional)</td>
</tr>
<tr>
<td width="50%"><var>repeatcount</var></td>
<td>Integer (Optional)</td>
</tr>
<tr>
<td width="50%"><var>backward</var></td>
<td>Integer (Optional)</td>
</tr>
<tr>
<td width="50%"><var>repeatflag</var></td>
<td>Integer (Optional)</td>
</tr>
<tr>
<td width="50%"><var>delay</var></td>
<td>Integer (Optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes character to perform an action, such as Bow or Salute. </td></tr>
<tr><td colspan="2">Notes: see client.inc for valid action IDs</td></tr>
<tr><td colspan="2">
  </td></tr>
<tr><td colspan="2"><pre>
const ACTION_DIR_FORWARD  := 0;
const ACTION_DIR_BACKWARD := 1;
const ACTION_NOREPEAT     := 0;
const ACTION_REPEAT       := 1;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayLightningBoltEffect">PlayLightningBoltEffect( center_object )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>center_object</var></td>
<td>UObject Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Plays a lightning bolt effect centered on the object.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 if invalid parameter).</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayMovingEffect">PlayMovingEffect( source, target, effect, speed, loop := 0, explode := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>source</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>target</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>Integer (0..255)</td>
</tr>
<tr>
<td width="50%"><var>loop</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>explode</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes a moving effect to be played, travelling from source to destination </td></tr>
<tr><td colspan="2">Notes: effect = an item graphic number (the first in a series if an animation) 
       speed = how fast the effect should travel. 
       loop = 0/1 loop the animation? 
       explode = 0/1 show an explosion at destination at the end of the effect?</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 if invalid parameter)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayMovingEffectEx">PlayMovingEffectEx( source, target, effect, speed, duration := 0, hue := 0, render := 0, fixeddirection := 0, explode := 0, effect3d := 0, effect3dexplode := 0, effect3dsound := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>source</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>target</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>Integer (0..255)</td>
</tr>
<tr>
<td width="50%"><var>duration</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>hue</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>render</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>fixeddirection</var></td>
<td>Integer (Optional, 0..1)</td>
</tr>
<tr>
<td width="50%"><var>explode</var></td>
<td>Integer (Optional, 0..1)</td>
</tr>
<tr>
<td width="50%"><var>effect3d</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>effect3dexplode</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>effect3dsound</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes a moving effect to be played, travelling from source to destination </td></tr>
<tr><td colspan="2">effect3d,effect3dexplode,effect3dsound are only interpreted by the 3D client</td></tr>
<tr><td colspan="2">effect3dexplode and effect3dsound are only interpreted if explode is set, effect3d and effect3dexplode values can be found in client/particles dir.</td></tr>
<tr><td colspan="2">Notes: effect = an item graphic number (the first in a series if an animation) 
       speed = how fast the effect should travel. 
       explode = 0/1 show an explosion at destination at the end of the effect?
       hue = which color should the effect have?
       fixeddirection = 0/1 should the effect change his facing?
       </td></tr>
<tr><td colspan="2">render values are:</td></tr>
<tr><td colspan="2">0 no change</td></tr>
<tr><td colspan="2">1 It becomes dark</td></tr>
<tr><td colspan="2">2 It becomes bright</td></tr>
<tr><td colspan="2">3 Bright color is emphasized and dark color is converted transparently</td></tr>
<tr><td colspan="2">4 The translucency (transparency is high)</td></tr>
<tr><td colspan="2">5 The translucency (it is close to primary color)</td></tr>
<tr><td colspan="2">6 Negative positive reversal</td></tr>
<tr><td colspan="2">7 The background which is transparent negative positive reversal</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Realms must match"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayMovingEffectXYZ">PlayMovingEffectXYZ( srcx, srcy, srcz, dstx, dsty, dstz, effect, speed, loop := 0, explode := 0, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>srcx,srcy,srcz</var></td>
<td>Integer Source world coordinates</td>
</tr>
<tr>
<td width="50%"><var>dstx,dsty,dstz</var></td>
<td>Integer Destination world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>integer (to 255)</td>
</tr>
<tr>
<td width="50%"><var>loop</var></td>
<td>integer (to 255)</td>
</tr>
<tr>
<td width="50%"><var>explode</var></td>
<td>integer (to 255)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Starts a moving effect between the source and destination coordinates.</td></tr>
<tr><td colspan="2">Notes: "effect" is a UO graphic number (the first graphic in a series for an animated effect)
       "speed" controls the time between frames of animation
       "loop" controls the number of total frames to play in the animation (loops if greater than the length of the animation). 0 = play once.
       "explode" flags if an explosion effect should be played at the end of the animation</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success, 0 or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayMovingEffectXYZEx">PlayMovingEffectXYZEx( srcx, srcy, srcz, dstx, dsty, dstz, realm := _DEFAULT_REALM, effect, speed, duration := 0, hue := 0, render := 0, fixeddirection := 0, explode := 0, effect3d := 0, effect3dexplode := 0, effect3dsound := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>srcx,srcy,srcz</var></td>
<td>Integer Source world coordinates</td>
</tr>
<tr>
<td width="50%"><var>dstx,dsty,dstz</var></td>
<td>Integer Destination world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>Integer (0..255)</td>
</tr>
<tr>
<td width="50%"><var>duration</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>hue</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>render</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>fixeddirection</var></td>
<td>Integer (Optional, 0..1)</td>
</tr>
<tr>
<td width="50%"><var>explode</var></td>
<td>Integer (Optional, 0..1)</td>
</tr>
<tr>
<td width="50%"><var>effect3d</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>effect3dexplode</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>effect3dsound</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes a moving effect to be played, travelling from source to destination </td></tr>
<tr><td colspan="2">effect3d,effect3dexplode,effect3dsound are only interpreted by the 3D client</td></tr>
<tr><td colspan="2">effect3dexplode and effect3dsound are only interpreted if explode is set, effect3d and effect3dexplode values can be found in client/particles dir.</td></tr>
<tr><td colspan="2">Notes: effect = an item graphic number (the first in a series if an animation) 
       speed = how fast the effect should travel. 
       explode = 0/1 show an explosion at destination at the end of the effect?
       hue = which color should the effect have?
       fixeddirection = 0/1 should the effect change his facing?</td></tr>
<tr><td colspan="2">render values are:</td></tr>
<tr><td colspan="2">0 no change</td></tr>
<tr><td colspan="2">1 It becomes dark</td></tr>
<tr><td colspan="2">2 It becomes bright</td></tr>
<tr><td colspan="2">3 Bright color is emphasized and dark color is converted transparently</td></tr>
<tr><td colspan="2">4 The translucency (transparency is high)</td></tr>
<tr><td colspan="2">5 The translucency (it is close to primary color)</td></tr>
<tr><td colspan="2">6 Negative positive reversal</td></tr>
<tr><td colspan="2">7 The background which is transparent negative positive reversal</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for realm"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayMusic">PlayMusic( chr, music_id := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>chr</var></td>
<td>Character</td>
</tr>
<tr>
<td width="50%"><var>musicid</var></td>
<td>Integer - ID of the music to be played on client</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Plays music on client, as if it had just entered a new region</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid Parameters"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayObjectCenteredEffect">PlayObjectCenteredEffect( uobject, effect, speed, loop := 0)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>uobject</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>Integer (0..255)</td>
</tr>
<tr>
<td width="50%"><var>loop</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes an effect to be played, centered on uobject, which follows uobject if it moves. </td></tr>
<tr><td colspan="2">Notes: see PlayMovingEffect for effect, speed, loop description
       This is used for effects like flame strike and reactive armor.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on invalid parameter)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayObjectCenteredEffectEx">PlayObjectCenteredEffectEx( center, effect, speed, duration := 0, hue := 0, render := 0, layer := 0, effect3d := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>center</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>Integer (0..255)</td>
</tr>
<tr>
<td width="50%"><var>duration</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>hue</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>render</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>layer</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>effect3d</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes an effect to be played, centered on uobject, which follows uobject if it moves. </td></tr>
<tr><td colspan="2">layer, effect3d are only interpreted by the 3D client</td></tr>
<tr><td colspan="2">effect3d values can be found in client/particles dir.</td></tr>
<tr><td colspan="2">Notes: effect = an item graphic number (the first in a series if an animation) 
       speed = how fast the effect should travel.
       duration = controls the number of total frames to play in the animation (loops if greater than the length of the animation). 0 = play once. 
       hue = which color should the effect have?</td></tr>
<tr><td colspan="2">render values are:</td></tr>
<tr><td colspan="2">0 no change</td></tr>
<tr><td colspan="2">1 It becomes dark</td></tr>
<tr><td colspan="2">2 It becomes bright</td></tr>
<tr><td colspan="2">3 Bright color is emphasized and dark color is converted transparently</td></tr>
<tr><td colspan="2">4 The translucency (transparency is high)</td></tr>
<tr><td colspan="2">5 The translucency (it is close to primary color)</td></tr>
<tr><td colspan="2">6 Negative positive reversal</td></tr>
<tr><td colspan="2">7 The background which is transparent negative positive reversal</td></tr>
<tr><td colspan="2">layer values are:</td></tr>
<tr><td colspan="2">0 Head</td></tr>
<tr><td colspan="2">1 RightHand</td></tr>
<tr><td colspan="2">2 LeftHand</td></tr>
<tr><td colspan="2">3 Waist</td></tr>
<tr><td colspan="2">4 LeftFoot</td></tr>
<tr><td colspan="2">5 RightFoot</td></tr>
<tr><td colspan="2">7 CenterFeet</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on invalid parameter)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlaySoundEffect">PlaySoundEffect( object, effect )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes a sound effect to be played, centered on object. </td></tr>
<tr><td colspan="2">Notes: see client.inc for sound effect constants</td></tr>
<tr><td colspan="2">All clients within a range of 18 tiles are sent this command. Use PlaySoundEffectPrivate() for private sounds.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlaySoundEffectXYZ">PlaySoundEffect( x, y, z, effect, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes a sound effect to be played, centered on Location. </td></tr>
<tr><td colspan="2">Notes: see client.inc for sound effect constants</td></tr>
<tr><td colspan="2">All clients within a range of 18 tiles are sent this command. Use PlaySoundEffectPrivate() for private sounds.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlaySoundEffectPrivate">PlaySoundEffectPrivate( object, effect, playfor )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>playfor</var></td>
<td>Character Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Plays a sound effect only heard by "playfor", centered around "object"</td></tr>
<tr><td colspan="2">Notes: see client.inc for sound IDs (or InsideUO)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayStationaryEffect">PlayStationaryEffect( x, y, z, effect, speed, loop := 0, explode := 0, realm := _DEFAULT_REALM )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>integer (to 255)</td>
</tr>
<tr>
<td width="50%"><var>loop</var></td>
<td>integer (to 255)</td>
</tr>
<tr>
<td width="50%"><var>explode</var></td>
<td>integer (to 255)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Starts a stationary graphic effect at x,y,z.</td></tr>
<tr><td colspan="2">Notes: "effect" is a UO graphic number (the first graphic in a series for an animated effect)
       "speed" controls the time between frames of animation
       "loop" controls the number of total frames to play in the animation (loops if greater than the length of the animation). 0 = play once.
       "explode" flags if an explosion effect should be played at the end of the animation</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for Realm"</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PlayStationaryEffectEx">PlayStationaryEffectEx( x, y, z, realm := _DEFAULT_REALM, effect, speed, duration := 0, hue := 0, render := 0, layer := 0, effect3d := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>x,y,z</var></td>
<td>Integer world coordinates</td>
</tr>
<tr>
<td width="50%"><var>realm</var></td>
<td>String - case-sensitive name of the realm</td>
</tr>
<tr>
<td width="50%"><var>effect</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>speed</var></td>
<td>Integer (to 255)</td>
</tr>
<tr>
<td width="50%"><var>duration</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>hue</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>render</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>layer</var></td>
<td>Integer (Optional, 0..255)</td>
</tr>
<tr>
<td width="50%"><var>effect3d</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Starts a stationary graphic effect at x,y,z.</td></tr>
<tr><td colspan="2">layer, effect3d are only interpreted by the 3D client</td></tr>
<tr><td colspan="2">effect3d values can be found in client/particles dir.</td></tr>
<tr><td colspan="2">Notes: effect= is a UO graphic number (the first graphic in a series for an animated effect)
       speed = controls the time between frames of animation
       duration = controls the number of total frames to play in the animation (loops if greater than the length of the animation). 0 = play once.
  </td></tr>
<tr><td colspan="2">render values are:</td></tr>
<tr><td colspan="2">0 no change</td></tr>
<tr><td colspan="2">1 It becomes dark</td></tr>
<tr><td colspan="2">2 It becomes bright</td></tr>
<tr><td colspan="2">3 Bright color is emphasized and dark color is converted transparently</td></tr>
<tr><td colspan="2">4 The translucency (transparency is high)</td></tr>
<tr><td colspan="2">5 The translucency (it is close to primary color)</td></tr>
<tr><td colspan="2">6 Negative positive reversal</td></tr>
<tr><td colspan="2">7 The background which is transparent negative positive reversal</td></tr>
<tr><td colspan="2">layer values are:</td></tr>
<tr><td colspan="2">0 Head</td></tr>
<tr><td colspan="2">1 RightHand</td></tr>
<tr><td colspan="2">2 LeftHand</td></tr>
<tr><td colspan="2">3 Waist</td></tr>
<tr><td colspan="2">4 LeftFoot</td></tr>
<tr><td colspan="2">5 RightFoot</td></tr>
<tr><td colspan="2">7 CenterFeet</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Realm not found"</td></tr>
<tr><td colspan="2">"Invalid Coordinates for realm"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Polcore">Polcore()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Returns a Polcore object. See object reference for object methods.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Polcore object reference</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Polcore"><b>Polcore</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PrintTextAbove">PrintTextAbove( above_object, text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR, journal_print := JOURNAL_PRINT_NAME)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>above_object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>text</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional)</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer (optional)</td>
</tr>
<tr>
<td width="50%"><var>journal_print</var></td>
<td>Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Prints text above an object, as if spoken.</td></tr>
<tr><td colspan="2">Notes: see client.inc for suitable values for font and color</td></tr>
<tr><td colspan="2">Notes: journal_print flags:
</td></tr>
<tr><td colspan="2"><pre>
const JOURNAL_PRINT_NAME  := 0x00; // Implicit.  Print's the object's description / npc's name in the journal.
const JOURNAL_PRINT_YOU_SEE := 0x01; // Will print "You see:" in the journal.</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">0 if text was too long (&gt;200 characters)</td></tr>
<tr><td colspan="2">1 on success</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"A parameter was invalid"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="PrintTextAbovePrivate">PrintTextAbovePrivate( above_object, text, character, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR, journal_print := JOURNAL_PRINT_NAME )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>above_object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>text</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional)</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer (optional)</td>
</tr>
<tr>
<td width="50%"><var>journal_print</var></td>
<td>Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Causes text to be displayed above "above_object", as if spoken. This text will only 
        be seen by a single character referenced by "character"</td></tr>
<tr><td colspan="2">Notes: see client.inc for suitable values for font and color</td></tr>
<tr><td colspan="2">Notes: journal_print flags:
</td></tr>
<tr><td colspan="2"><pre>
const JOURNAL_PRINT_NAME  := 0x00; // Implicit.  Print's the object's description / npc's name in the journal.
const JOURNAL_PRINT_YOU_SEE := 0x01; // Will print "You see:" in the journal.</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">0 if text was too long (&gt;200 characters)</td></tr>
<tr><td colspan="2">1 on success</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"A parameter was invalid"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ReadGameClock">ReadGameClock()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Returns the total number of seconds the server has been active.</td></tr>
<tr><td colspan="2">Notes: The Game Clock is a seconds-counter.  It is started after all data is read, and is 
      stopped just before writing data.  It has no relationship to real-world calendar time.  
      It counts real-time seconds - if the system is running slow, it will reliably tell you 
      how many real-time seconds have passed while the game was running. </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer - The current value of the game clock. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="RegisterForSpeechEvents">RegisterForSpeechEvents( at_object, range, flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>at_object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>range</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Player-character speech spoken within "range" tiles of "at_object" will generate 
        speech events, which are sent to "at_object"'s control script (use wait_for_event()
        to retreive the event).</td></tr>
<tr><td colspan="2">uo.em constants for flags:
          const LISTENPT_HEAR_GHOSTS      := 0x01;</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Already registered for speech events"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ReleaseItem">ReleaseItem( item )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Releases an item previously reserved by ReserveItem().</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"That item is not reserved by this script." if item is not reserved (using ReserveItem())</td></tr>
<tr><td colspan="2">"That item is not reserved." if the item is not "in use"</td></tr>
<tr><td colspan="2">"Invalid parameter"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="RequestInput">RequestInput(character, item, prompt )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
<tr>
<td width="50%"><var>prompt</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Prompts a player for input, and waits for the player to type a line of text. </td></tr>
<tr><td colspan="2">Notes: "item" is a placeholder - the client needs it, but it is not used internally.  
      Typically some related item will be passed. </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A String containing the next line of text from the client's keyboard on success. Returns 0 (int) if control characters were found in the string.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Another script has an active prompt"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="ReserveItem">ReserveItem( item )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Reserves an item so no other script or client may manipulate it until ReleaseItem() is called.
  Use this function to prevent nasty exploits like this:
        </td></tr>
<tr><td colspan="2"><pre>
if(!ReserveItem(item))
  SendSysMessage(who, "You cannot use that.");
  return;
endif</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 Item has been reserved by me. 2 Item was already reserved by me. Or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"That item is already being used."</td></tr>
<tr><td colspan="2">"Invalid parameter"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="RestartScript">RestartScript( npc )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>npc</var></td>
<td>Character Reference (must be an NPC)</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Stops the current master script for an NPC, and starts a new one. </td></tr>
<tr><td colspan="2">npc.script can be assigned before calling this, to change the master script for an NPC. </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the script was started</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"RestartScript only operates on NPCs"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Resurrect">Resurrect( ghost, flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>ghost</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>integer flags</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Resurrects a ghost. Checks to see if the location occupied by the ghost is valid for an alive character first unless flags ==  RESURRECT_FORCELOCATION. (Be very careful with this unless you like exploits)
</td></tr>
<tr><td colspan="2"><pre>
flags:
const RESURRECT_FORCELOCATION := 0x01;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the ghost was resurrected successfully</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"That is not dead"</td></tr>
<tr><td colspan="2">"That location is blocked"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="RevokePrivilege">RevokePrivilege( character, privilege )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>privilage</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Revokes a privilege from a character. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the privilege was revoked, or if it was not previously granted. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SaveWorldState">SaveWorldState()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Saves the current world state. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">struct { CleanObjects, DirtyObjects, ElapsedMilliseconds }</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Exception during world save"</td></tr>
<tr><td colspan="2">"pol.cfg has InhibitSaves=1"</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SecureTradeWin">SecureTradeWin( character, character2 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>character2</var></td>
<td>Character Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Init secure trade via script over long distances.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"You can't trade with yourself."</td></tr>
<tr><td colspan="2">"No client attached."</td></tr>
<tr><td colspan="2">"Secure trading is unavailable."</td></tr>
<tr><td colspan="2">"You cannot trade with someone in war mode."</td></tr>
<tr><td colspan="2">"You cannot trade while in war mode."</td></tr>
<tr><td colspan="2">"That person is already involved in a trade."</td></tr>
<tr><td colspan="2">"You are already involved in a trade."</td></tr>
<tr><td colspan="2">"Ghosts cannot trade items."</td></tr>
<tr><td colspan="2">"Something goes wrong."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SelectColor">SelectColor( character, item )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a color chooser gump to character.</td></tr>
<tr><td colspan="2">Notes: Function blocks until character cancels or selects a color from the chooser gump.
       No validation is done by the core. Might be useful to check if the color returned is
       &gt;1001 (out of range for the chooser gump).</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer of selected color. use item.color = return_value to set.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Client is already selecting a color"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SelectMenuItem2">SelectMenuItem2( character, menuname )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>menuname</var></td>
<td>String name of the static menu in menus.cfg, or a dynamic menu reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Displays an object menu on the character's client for the player to select from. </td></tr>
<tr><td colspan="2">Notes: Can take a static or dynamic menu.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">0 if the menu was cancelled, or the character's client disconnected.</td></tr>
<tr><td colspan="2">A Structure on success:
        .objtype = Integer object type of the selection. 
        .index = 1-based index within the menu of the selection. 
        .graphic = Integer graphic of the object. 
        .color = color of the object.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Client is busy, or menu is empty"</td></tr>
<tr><td colspan="2">"Menu too large"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#menus.cfg"><b>menus.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendBuyWindow">SendBuyWindow( character, container, vendor, items, flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference to player</td>
</tr>
<tr>
<td width="50%"><var>container</var></td>
<td>Container Reference ( vendor 'for sale items' container )</td>
</tr>
<tr>
<td width="50%"><var>vendor</var></td>
<td>Character Reference to NPC vendor</td>
</tr>
<tr>
<td width="50%"><var>item</var></td>
<td>Container Reference (vendor 'player bought items' container)</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends the "buy scroll" gump to a player to choose items to buy.</td></tr>
<tr><td colspan="2">Notes: Pretty nasty function. Containers should be in storage areas.</td></tr>
<tr><td colspan="2">Notes: Core will send Item Description using AoS Tooltips in any case if flag VENDOR_SEND_AOS_TOOLTIP is set. This will correct problems with Item Descriptions in newer Clients, but maybe freeze ancient Clients...</td></tr>
<tr><td colspan="2">Notes: uo.em constants for this function:
</td></tr>
<tr><td colspan="2"><pre>
const VENDOR_SEND_AOS_TOOLTIP   := 0x01;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
<tr><td colspan="2">"No client connected to character"</td></tr>
<tr><td colspan="2">"Parameter 1 invalid"</td></tr>
<tr><td colspan="2">"Parameter 2 invalid"</td></tr>
<tr><td colspan="2">"Parameter 3 invalid"</td></tr>
<tr><td colspan="2">"Too much crap in vendor's inventory!" (message exceeds 2000 byte buffer)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendCharacterRaceChanger">SendCharacterRaceChanger( character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Send Client inside Character Race Changer to change Hair, Beard and Color.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendDialogGump">SendDialogGump( who, layout, textlines, x := 0, y := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>who</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>layout</var></td>
<td>String Array</td>
</tr>
<tr>
<td width="50%"><var>textlines</var></td>
<td>String Array</td>
</tr>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer-Offset</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a generic gump window to "who" and waits for the user's input.</td></tr>
<tr><td colspan="2">Notes: "layout" is an array of strings with each string a gump layout directive.
       "textlines" is an array of strings with text that is displayed on the gump. "Layout" references
          this array in a 0-based manner.
       Creating these arrays is difficult and hard to debug. See the "gumps" package for a more user-
       friendly interface to gumps.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2"> the return value is a dictionary.
       return[0] contains the button ID the user used to close the gump. 0 is returned if the gump was cancelled.
       return.keys contains the IDs for the radio buttons, checkboxes, and textentries set when the gump was returned. Note control characters are stripped from the text input lines.
      </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Buffer length exceeded" (64K byte)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Dictionary"><b>Dictionary</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendEvent">SendEvent( npc, event )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>npc</var></td>
<td>Character Reference to an NPC</td>
</tr>
<tr>
<td width="50%"><var>event</var></td>
<td>integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Sends the integer event (either a combination of system events, or one user-defined event) to the 
NPC's control script.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"That mobile is not an NPC"</td></tr>
<tr><td colspan="2">"That NPC doesn't have a control script"</td></tr>
<tr><td colspan="2">"Event queue is full, discarding event"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendInstaResDialog">SendInstaResDialog( character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Character's screen fades to black, "You are Dead" appears, Character gets menu choice for 
Instares.</td></tr>
<tr><td colspan="2">Notes: (Rac) Could not get menu dialog to appear, "Play as ghost" returned to server no matter what.
      "AssumePlayAsGhost" in uo.cfg made no difference.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Integer with choice. 1 = instares, 2 = ghost</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Client busy with another instares dialog"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendOpenBook">SendOpenBook( character, book )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>book</var></td>
<td>Item Reference (Book object only)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a book gump to the character.</td></tr>
<tr><td colspan="2">Notes: Need more info on book objects.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No active client"</td></tr>
<tr><td colspan="2">"book.GetNumLines() did not return an Integer"</td></tr>
<tr><td colspan="2">"book.GetContents() must return an array"</td></tr>
<tr><td colspan="2">"Buffer overflow"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Array"><b>Array</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendOpenSpecialContainer">SendOpenSpecialContainer( character, container )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>container</var></td>
<td>Container Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends an open container gump to the character.</td></tr>
<tr><td colspan="2">Notes: DANGEROUS FUNCTION. Normally only used to show "inaccessable" containers like bankboxes.
       If used on normal containers, it allows the character to both view and change the contents.
       See SendViewContainer().</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"That isn't a container"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendPacket">SendPacket( to_whom, packet_hex_string )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>to_whom</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>packet_hex_string</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends the hex string to the character as a binary packet.</td></tr>
<tr><td colspan="2">Notes: Development function, use at your own risk. The string is in a form like:
      SendPacket(who,"BC0401") would cause the season to change to "desolation"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Invalid packet string length."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendQuestArrow">SendQuestArrow(to_whom, x := -1, y := -1)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>to_whom</var></td>
<td>Character reference the arrow shows to</td>
</tr>
<tr>
<td width="50%"><var>x,y</var></td>
<td>Integer world coordinates</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a "quest arrow" to the player that points at x,y</td></tr>
<tr><td colspan="2">Passing 'x' and 'y' within map bounds will set the Quest Arrow to point at that location.</td></tr>
<tr><td colspan="2">Passing -1 as 'x' and 'y' (ie. by just called SendQuestArrow(to_whom)) will remove it.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Invalid parameter"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendSellWindow">SendSellWindow( character, vendor, i1, i2, i3, flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>vendor</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>i1</var></td>
<td>Container Reference</td>
</tr>
<tr>
<td width="50%"><var>i2</var></td>
<td>Container Reference</td>
</tr>
<tr>
<td width="50%"><var>i3</var></td>
<td>Container Reference</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a sell scroll gump to "character" using "vendor" as the merchant.</td></tr>
<tr><td colspan="2">Notes: i1 = vendor's "For sale" item containter. i2 = vendor's "Bought from player" item container. i3 = vendor's "Buyable" item container.</td></tr>
<tr><td colspan="2">Notes: Core will send Item Description using AoS Tooltips in any case if flag VENDOR_SEND_AOS_TOOLTIP is set. This will correct problems with Item Descriptions in newer Clients, but maybe freeze ancient Clients...</td></tr>
<tr><td colspan="2">Notes: uo.em constants for this function:
</td></tr>
<tr><td colspan="2"><pre>
const VENDOR_SEND_AOS_TOOLTIP   := 0x01;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"A parameter was invalid"</td></tr>
<tr><td colspan="2">"No client connected to character"</td></tr>
<tr><td colspan="2">"Parameter 1 invalid" if !(vendor.isa(POLCLASS_NPC))</td></tr>
<tr><td colspan="2">"Parameter 2 must be a container"</td></tr>
<tr><td colspan="2">"Character has no backpack"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendSkillWindow">SendSkillWindow( towhom, forwhom )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>towhom</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>forwhom</var></td>
<td>Character Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a skills scroll gump to "towhom"</td></tr>
<tr><td colspan="2">Notes: The skills belong to "forwhom" and are sent to "towhom"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendStatus">SendStatus( character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Send full Status Packet to support Extensions like Resistances, if you add'em via Packet Hook. Use SendStatus to update'em.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Mobile must not be offline"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendStringAsTipWindow">SendStringAsTipWindow( character, text )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>text</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends "text" to "character" in a tip-window gump.</td></tr>
<tr><td colspan="2">Text needs to be in "MAC" format: CR at the end of each line.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendSysMessage">SendSysMessage( character, text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>text</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>font</var></td>
<td>Integer (optional)</td>
</tr>
<tr>
<td width="50%"><var>color</var></td>
<td>Integer (optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Displays a System Message in the lower-left corner of character's player's screen. </td></tr>
<tr><td colspan="2">Notes: see client.inc for suitable values of font and color.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Mobile has no active client"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendTextEntryGump">SendTextEntryGump( who, line1, cancel := TE_CANCEL_ENABLE, style := TE_STYLE_NORMAL, maximum := 40, 
line2 := "" )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>who</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>cancel</var></td>
<td>Integer (TE_CANCEL_DISABLE or TE_CANCEL_ENABLE)</td>
</tr>
<tr>
<td width="50%"><var>style</var></td>
<td>Integer (TE_STYLE_DISABLE or TE_STYLE_NORMAL or TE_STYLE_NUMERICAL)</td>
</tr>
<tr>
<td width="50%"><var>maximum</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>line2</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a text-entry gump to "who" with the specified option, style, and informational 
string.</td></tr>
<tr><td colspan="2">Notes: uo.em constants for this function:
</td></tr>
<tr><td colspan="2"><pre>
const TE_CANCEL_DISABLE := 0;
const TE_CANCEL_ENABLE  := 1;
      
const TE_STYLE_DISABLE  := 0;
const TE_STYLE_NORMAL   := 1;
const TE_STYLE_NUMERICAL:= 2;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A String on success
       0 if gump was cancelled.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SendViewContainer">SendViewContainer( character, container )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>container</var></td>
<td>Container Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends the container's open gump and contents to the character.</td></tr>
<tr><td colspan="2">Notes: Use this for normal containers.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"That isn't a container"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Container"><b>Container</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SetGlobalProperty">SetGlobalProperty( propertyname, propertyvalue )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>propertyname</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>propertyvalue</var></td>
<td>a script object (could be string, int, real, array, etc)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Sets the value of a global property. propertyname is case-sensative</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SetName">SetName( object, name )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>name</var></td>
<td>String</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Sets name of item or mobile.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (returns 0 on failure)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SetObjProperty">SetObjProperty( object, propertyname, propertyvalue )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>object</var></td>
<td>UObject Reference</td>
</tr>
<tr>
<td width="50%"><var>propertyname</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>propertyvalue</var></td>
<td>a script object (could be string, int, real, array, etc)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Sets a custom data property on an object. This data will be saved with the object, for later retrieval with GetObjProperty. propertyname is case-sensative</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Invalid parameter type"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SetRegionLightLevel">SetRegionLightLevel( regionname, lightlevel )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>regionname</var></td>
<td>String</td>
</tr>
<tr>
<td width="50%"><var>lightlevel</var></td>
<td>Integer (0..30)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sets the light level of a region by name.</td></tr>
<tr><td colspan="2">Notes: lightlevel must be a value between 0 and 30 where 0 is daylight and 30 is near-total darkness. 
       regionname must match a region name from REGIONS\LIGHT.CFG.  </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 if the light level was set successfully</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid Parameter type"</td></tr>
<tr><td colspan="2">"Light Level is out of range"</td></tr>
<tr><td colspan="2">"Light region not found"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#light.cfg"><b>light.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SetRegionWeatherLevel">SetRegionWeatherLevel( region, type, severity, aux := 0, lightoverride := -1)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>region</var></td>
<td>string</td>
</tr>
<tr>
<td width="50%"><var>type</var></td>
<td>integer</td>
</tr>
<tr>
<td width="50%"><var>severity</var></td>
<td>integer</td>
</tr>
<tr>
<td width="50%"><var>aux</var></td>
<td>integer (optional, see above for default values)</td>
</tr>
<tr>
<td width="50%"><var>lightoverride</var></td>
<td>integer (optional, see above for default values)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sets the weather effects for a given weather region.</td></tr>
<tr><td colspan="2">
</td></tr>
<tr><td colspan="2"><pre>
Notes: Weather values by Tharaxis
type:
    0 - light rain ("It starts to rain")
    1 - rain/thunder ("A fierce storm approaches")
    2 - snow ("It begins to snow")
    3 - brewing storm - ("A storm is brewing")
    255 - None (Turns sound effects off)
      
    severity:is set on a 0-70 scale, 70=torrential rain, 0=light drizzle.     
    aux: ??? 
    lightoverride: light level amount overrides current level. -1 means no override.</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid Parameter type"</td></tr>
<tr><td colspan="2">"Weather region not found" if "region" not found in regions/weather.cfg</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#weather.cfg"><b>weather.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SetScriptController">SetScriptController( who )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>who</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Set the "controller" of the current script to "who".</td></tr>
<tr><td colspan="2">Notes: This is used to know, for instance, who the fire field walk-on script belongs to so that
        the reputation/criminal system knows who to punish.</td></tr>
<tr><td colspan="2">pass 0 to clear the script controller.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">Character Reference of the "old" controller of the script.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">none (instead returns 0 on failure)</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Shutdown">Shutdown()</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Shuts down the server</td></tr>
<tr><td colspan="2">Notes: Disconnects all clients and saves the world state.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 always</td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SpeakPowerWords">SpeakPowerWords( who, spellid )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>who</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>spellid</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Forces character "who" to speak the spell power words as defined in spells.cfg.</td></tr>
<tr><td colspan="2">Notes: spells.cfg files define spells and spell ids.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"No such spell"</td></tr>
<tr><td colspan="2">"Spell ID out of range"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#spells.cfg"><b>spells.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="StartSpellEffect">StartSpellEffect( who, spellid )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>who</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>spellid</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Starts the spell script as defined in spells.cfg</td></tr>
<tr><td colspan="2">Notes: spells.cfg files define spells and spell ids.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"No such spell"</td></tr>
<tr><td colspan="2">"Spell ID out of range"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related Configs</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="configfiles.html#spells.cfg"><b>spells.cfg</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SubtractAmount">SubtractAmount( item, amount )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
<tr>
<td width="50%"><var>amount</var></td>
<td>Integer</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Decreases the stack size of an item.  If nothing is left, deletes the item. </td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"That item is being used."</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="SystemFindObjectBySerial">SystemFindObjectBySerial( serial, sysfind_flags := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>serial</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>sysfind_flags</var></td>
<td>Integer (optional, default 0)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Searches the world for an item or mobile by serial number. This could be used
        if the serial number of an object was saved with SetObjProperty, for example. </td></tr>
<tr><td colspan="2">Notes: uo.em constants for flags:
</td></tr>
<tr><td colspan="2"><pre>
const SYSFIND_SEARCH_OFFLINE_MOBILES := 1;</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A Character Reference, Item Reference, or Multi reference on success.</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Character not found"</td></tr>
<tr><td colspan="2">"Item not found."</td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="Target">Target( by_character, options := TGTOPT_CHECK_LOS+TGTOPT_NEUTRAL)</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>by_character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>options</var></td>
<td>Integer (Optional)</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a target cursor to "by_character"'s client, and waits for the player to target something. </td></tr>
<tr><td colspan="2">Notes: Options control Line-of-sight checking. </td></tr>
<tr><td colspan="2">0 is returned if the character does not have line-of-sight to the object.</td></tr>
<tr><td colspan="2">uo.em constants for options, just add together non-mutually exclusive options.
</td></tr>
<tr><td colspan="2"><pre>
const TGTOPT_CHECK_LOS   := 0x0001;
const TGTOPT_NOCHECK_LOS := 0x0000; // to be explicit
const TGTOPT_HARMFUL     := 0x0002;
const TGTOPT_NEUTRAL     := 0x0000; // to be explicit
const TGTOPT_HELPFUL     := 0x0004;</pre></td></tr>
<tr><td colspan="2">
       The first 2 options specify if Line-of-sight to the targetting obejct should be checked or not.
       The last 3 options are involved with the reputation system. Use TGTOPT_HARMFUL if the effect that
       uses the target is a hostile action (like casting fireball), use _HELPFUL for things like healing
       and use _NEUTRAL for reputation-neutral actions.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">0 if user cancelled, or nothing targetted, or no LOS to target (if option is selected)</td></tr>
<tr><td colspan="2">UObject Reference on success (item or character or multi)</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client connected"</td></tr>
<tr><td colspan="2">"Client busy with another target cursor"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#UObject"><b>UObject</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="TargetCoordinates">TargetCoordinates( Character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>Character</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends a target cursor to a character's client, and waits for the player to target a ground tile.</td></tr>
<tr><td colspan="2">Notes: Line-of-sight is not checked.</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody>
<tr><td colspan="2">A Structure on success: 
members: structure.x,structure.y,structure.z,structure.realm - containing the location targetted. 
     structure.objtype - containing the objtype of the static object targetted. 
     Not always present members:
     structure.item contains an Item Reference to a dynamic item targetted. 
     structure.mobile contains a Character Reference to a mobile targetted.</td></tr>
<tr><td colspan="2">0 if the target cursor was cancelled or the client disconnected. </td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"Mobile has no active client"</td></tr>
<tr><td colspan="2">"Client has an active target cursor"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody><tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr></tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="TargetMultiPlacement">TargetMultiPlacement( character, objtype, flags := 0, xoffset := 0, yoffset := 0 )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
<tr>
<td width="50%"><var>objtype</var></td>
<td>Integer</td>
</tr>
<tr>
<td width="50%"><var>flags</var></td>
<td>Integer (optional)</td>
</tr>
<tr>
<td width="50%"><var>xoffset,yoffset</var></td>
<td>Integer offset to 'ghost' target house</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">Sends character a "ghost" multi to select placement location in the world.</td></tr>
<tr><td colspan="2">Notes: objtype must be from an itemdesc.cfg entry with a Boat or House type.</td></tr>
<tr><td colspan="2">boats only constants for flags:
</td></tr>
<tr><td colspan="2"><pre>
const CRMULTI_FACING_NORTH      := 0x0000;  
const CRMULTI_FACING_EAST       := 0x0100;
const CRMULTI_FACING_SOUTH      := 0x0200;
const CRMULTI_FACING_WEST       := 0x0300;</pre></td></tr>
<tr><td colspan="2">For House target placement, flags should == 0.</td></tr>
<tr><td colspan="2">NOTE: the coordinates returned by this are the coordinates of the "target" cursor, not the center of the house if you use x/yoffset! So if you want to have the front steps be under the cursor, you must transform the parameters to CreateMultiAtLocation to include your xoffset and yoffset. Positive offsets move the cursor left/down in relation to the ghost house. An example using the front steps to target:
</td></tr>
<tr><td colspan="2"><pre>    var dims := GetMultiDimensions( 0x6071 );
    if(!dims) return; endif
    var loc := TargetMultiPlacement( who, 0x6071, 0, 0, dims.ymax );
    if(!loc) return; endif
    var house := CreateMultiAtLocation( loc.x, loc.y - dims.ymax, loc.z, 0x6071, 0, who.realm );</pre></td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">A Structure (x,y,z) containing the location targetted on success</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter type"</td></tr>
<tr><td colspan="2">"No client attached"</td></tr>
<tr><td colspan="2">"Client busy with another target cursor"</td></tr>
<tr><td colspan="2">"Object Type is out of range for Multis"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#House"><b>House</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Boat"><b>Boat</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="UpdateMobile">UpdateMobile( mobile )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody><tr>
<td width="50%"><var>mobile</var></td>
<td>Character Reference</td>
</tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody><tr><td colspan="2">Sends to mobiles in visual range UpdatePlayer packet of mobile, for example to inform of notority changes</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody><tr><td colspan="2">"Mobile is offline"</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr>
</tbody>
</table>
</div>
<div class="doc-mainbox-gold">
<div class="doc-anchor"><a href="#TOP">[^]</a></div>
<table class="doc-table" frame="void" rules="groups" width="100%" border="1" CELLPADDING="1" CELLSPACING="0">
<tbody><tr><th align="center" colspan="2"><a name="UseItem">UseItem( item, character )</a></th></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Parameters:</th></tr></tbody>
<tbody><tr id="doc-table-med">
<td>Name</td>
<td>Type</td>
</tr></tbody>
<tbody>
<tr>
<td width="50%"><var>item</var></td>
<td>Item Reference</td>
</tr>
<tr>
<td width="50%"><var>character</var></td>
<td>Character Reference</td>
</tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Explanation</th></tr></tbody>
<tbody>
<tr><td colspan="2">This will allow the item specified's use script to be run by the character specified.  No checks are done for distance, or check for being a ghost, or anything else.</td></tr>
<tr><td colspan="2">Warning: This function can also be called with NPC's as the character, but any use script that requires interactivity with it's user that is called on an NPC may have unpredictable results(dependant on the script).</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Return values</th></tr></tbody>
<tbody><tr><td colspan="2">1 on success, 0 or Error</td></tr></tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Errors</th></tr></tbody>
<tbody>
<tr><td colspan="2">"Invalid parameter"</td></tr>
<tr><td colspan="2">"Character busy."</td></tr>
<tr><td colspan="2">"Failed to start script!"</td></tr>
</tbody>
<tbody><tr id="doc-table-dark"><th align="left" colspan="2">Related</th></tr></tbody>
<tbody>
<tr><td colspan="2"><a href="objref.html#Item"><b>Item</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#Character"><b>Character</b></a></td></tr>
<tr><td colspan="2"><a href="objref.html#NPC"><b>NPC</b></a></td></tr>
</tbody>
</table>
</div>
</div>
</div></div>
</div></div>
<div id="footer">
	<div class="container">
    <p >
      If you <i>know</i> if any information is incorrect on these pages, mail your corrections to polteam@polserver.com
    </p>
    <p >
      Copyright &copy;2003-2009 David Carpman and POL Development Team, all rights reserved. DO NOT REPRODUCE, MIRROR, ALTER, SPINDLE, MUTILATE, OR SIT ON.
    </p>
    </div>
    </div>
    </body>
    </html>
   